1
0
Fork 0
forked from lthn/blockchain

more checks in core regarding collect_rangeproofs_data_from_tx()

This commit is contained in:
cryptozoidberg 2022-07-14 21:20:29 +02:00
parent fccf54b295
commit e7489557a6
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC

View file

@ -5476,6 +5476,10 @@ bool blockchain_storage::collect_rangeproofs_data_from_tx(std::vector<zarcanum_o
proofs_count++;
}
}
CHECK_AND_ASSERT_MES(proofs_count > 0, false, "transaction " << get_transaction_hash(tx) << " don't have range_proofs");
CHECK_AND_ASSERT_MES(proofs_count == 1 || (get_tx_flags(tx) & TX_FLAG_SIGNATURE_MODE_SEPARATE), false, "transaction " << get_transaction_hash(tx)
<< " has TX_FLAG_SIGNATURE_MODE_SEPARATE but proofs_count = " << proofs_count);
return false;
}