Skip to content

Commit

Permalink
Merge pull request #8953
Browse files Browse the repository at this point in the history
ed05ac6 wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
  • Loading branch information
luigi1111 committed Aug 17, 2023
2 parents 9d5c5b5 + ed05ac6 commit 3bebcc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2006,14 +2006,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");
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);
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;
CHECK_AND_ASSERT_THROW_MES(multisig_ki == vin_ki, "Mismatched key image b/t vin and construction data");
const crypto::key_image& vin_ki = boost::get<cryptonote::txin_to_key>(ptx.tx.vin[src_idx]).k_image;

// 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(vin_ki);
}
}
// Step 2. Scan all transfers for frozen key images
Expand Down

0 comments on commit 3bebcc4

Please sign in to comment.