mirror of
https://github.com/monero-project/monero.git
synced 2025-08-15 16:50:15 -04:00
db: throw when given a non txout_to_key output to add
The check was explicit in the original version, so it seems safer to make it explicit here, especially as it is now done implicitely in a different place, away from the original check.
This commit is contained in:
parent
d0e434f0d8
commit
5eef64578b
3 changed files with 13 additions and 0 deletions
|
@ -695,6 +695,10 @@ void BlockchainLMDB::add_output(const crypto::hash& tx_hash, const tx_out& tx_ou
|
|||
if (mdb_put(*m_write_txn, m_output_keys, &k, &data, 0))
|
||||
throw0(DB_ERROR("Failed to add output pubkey to db transaction"));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw0(DB_ERROR("Wrong output type: expected txout_to_key"));
|
||||
}
|
||||
|
||||
m_num_outputs++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue