mirror of
https://github.com/monero-project/monero.git
synced 2026-01-10 20:23:44 -08:00
rct: change the simple flag to a type
for future expansion
This commit is contained in:
@@ -2464,8 +2464,9 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context
|
||||
// from version 2, check ringct signatures
|
||||
// obviously, the original and simple rct APIs use a mixRing that's indexes
|
||||
// in opposite orders, because it'd be too simple otherwise...
|
||||
if (tx.rct_signatures.simple)
|
||||
switch (tx.rct_signatures.type)
|
||||
{
|
||||
case rct::RCTTypeSimple: {
|
||||
rct::ctkeyM reconstructed_mixRing;
|
||||
std::vector<rct::keyV> reconstructed_II;
|
||||
rct::ctkeyV reconstructed_outPk;
|
||||
@@ -2568,9 +2569,9 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context
|
||||
LOG_PRINT_L1("Failed to check ringct signatures!");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
case rct::RCTTypeFull: {
|
||||
rct::ctkeyM reconstructed_mixRing;
|
||||
rct::keyV reconstructed_II;
|
||||
rct::ctkeyV reconstructed_outPk;
|
||||
@@ -2674,6 +2675,11 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context
|
||||
LOG_PRINT_L1("Failed to check ringct signatures!");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_PRINT_L1("Unsupported rct type: " << tx.rct_signatures.type);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user