mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 00:49:26 -05:00
Merge pull request #7633
f6e2636
blockchain_db: harden code against invalid input types (moneromooo-monero)
This commit is contained in:
commit
f8abb225fc
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user