diff options
author | jeffro256 <jeffro256@tutanota.com> | 2023-07-16 13:29:52 -0500 |
---|---|---|
committer | jeffro256 <jeffro256@tutanota.com> | 2023-07-17 22:53:55 -0500 |
commit | ed05ac6872685c3c4fa9adb84b7f99d5188e2c1b (patch) | |
tree | 0a93133c0e033e01cb4c201778b3752ca202dd9b /src/wallet/wallet2.cpp | |
parent | Merge pull request #8917 (diff) | |
download | monero-ed05ac6872685c3c4fa9adb84b7f99d5188e2c1b.tar.xz |
wallet2: when checking frozen multisig tx set, don't assume order
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 727ab32f9..315cc8ae7 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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"); 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 |