diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-06-24 14:00:59 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-06-24 14:00:59 -0500 |
commit | f8abb225fc0fcaab32aad21ad34316bd835f13c7 (patch) | |
tree | b00d1b389b93d8daeccb35cb2b684094147db67e /src | |
parent | Merge pull request #7612 (diff) | |
parent | blockchain_db: harden code against invalid input types (diff) | |
download | monero-f8abb225fc0fcaab32aad21ad34316bd835f13c7.tar.xz |
Merge pull request #7633
f6e2636 blockchain_db: harden code against invalid input types (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/blockchain_db/blockchain_db.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index 5e12fa8ec..a84a4148d 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -216,15 +216,8 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const std::pair } else { - LOG_PRINT_L1("Unsupported input type, removing key images and aborting transaction addition"); - for (const txin_v& tx_input : tx.vin) - { - if (tx_input.type() == typeid(txin_to_key)) - { - remove_spent_key(boost::get<txin_to_key>(tx_input).k_image); - } - } - return; + LOG_PRINT_L1("Unsupported input type, aborting transaction addition"); + throw std::runtime_error("Unexpected input type, aborting"); } } |