mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 09:24:47 +00:00
wallet2: when checking frozen multisig tx set, don't assume order
This commit is contained in:
parent
ab826008d6
commit
ed05ac6872
1 changed files with 4 additions and 4 deletions
|
@ -2001,14 +2001,14 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
|
||||||
CHECK_AND_ASSERT_THROW_MES(cd.sources.size() == ptx.tx.vin.size(), "mismatched multisg tx set source sizes");
|
CHECK_AND_ASSERT_THROW_MES(cd.sources.size() == ptx.tx.vin.size(), "mismatched multisg tx set source sizes");
|
||||||
for (size_t src_idx = 0; src_idx < cd.sources.size(); ++src_idx)
|
for (size_t src_idx = 0; src_idx < cd.sources.size(); ++src_idx)
|
||||||
{
|
{
|
||||||
// Check that the key images are consistent between tx vin and construction data
|
// Extract keys images from tx vin and construction data
|
||||||
const crypto::key_image multisig_ki = rct::rct2ki(cd.sources[src_idx].multisig_kLRki.ki);
|
const crypto::key_image multisig_ki = rct::rct2ki(cd.sources[src_idx].multisig_kLRki.ki);
|
||||||
CHECK_AND_ASSERT_THROW_MES(ptx.tx.vin[src_idx].type() == typeid(cryptonote::txin_to_key), "multisig tx cannot be miner");
|
CHECK_AND_ASSERT_THROW_MES(ptx.tx.vin[src_idx].type() == typeid(cryptonote::txin_to_key), "multisig tx cannot be miner");
|
||||||
const crypto::key_image vin_ki = boost::get<cryptonote::txin_to_key>(ptx.tx.vin[src_idx]).k_image;
|
const crypto::key_image& vin_ki = boost::get<cryptonote::txin_to_key>(ptx.tx.vin[src_idx]).k_image;
|
||||||
CHECK_AND_ASSERT_THROW_MES(multisig_ki == vin_ki, "Mismatched key image b/t vin and construction data");
|
|
||||||
|
|
||||||
// Add key image to set
|
// Add key images to set (there will be some overlap)
|
||||||
kis_to_sign.insert(multisig_ki);
|
kis_to_sign.insert(multisig_ki);
|
||||||
|
kis_to_sign.insert(vin_ki);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Step 2. Scan all transfers for frozen key images
|
// Step 2. Scan all transfers for frozen key images
|
||||||
|
|
Loading…
Reference in a new issue