mirror of
https://codeberg.org/wowario/wownero
synced 2026-12-01 15:04:36 +01:00
wallet2: add parse multisig tx sanity checks
(cherry picked from commit 2094d38c86bab8ab23bb5ddfb5cd7ce3a7957a63)
This commit is contained in:
@@ -8298,6 +8298,8 @@ bool wallet2::parse_multisig_tx_from_str(std::string multisig_tx_st, multisig_tx
|
||||
for (size_t idx: ptx.construction_data.selected_transfers)
|
||||
CHECK_AND_ASSERT_MES(idx < m_transfers.size(), false, "Transfer index out of range");
|
||||
CHECK_AND_ASSERT_MES(ptx.construction_data.sources.size() == ptx.tx.vin.size(), false, "Mismatched sources/vin sizes");
|
||||
CHECK_AND_ASSERT_MES(!ptx.tx.vin.empty(), false, "Multisig tx has no inputs");
|
||||
CHECK_AND_ASSERT_MES(!ptx.construction_data.sources.empty(), false, "Multisig tx has no sources");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user