mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 06:09:24 -05:00
blockchain_db: store key images for tx without outputs too
This commit is contained in:
parent
9c3715e46a
commit
533acc30ed
@ -60,19 +60,16 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti
|
||||
|
||||
// iterate tx.vout using indices instead of C++11 foreach syntax because
|
||||
// we need the index
|
||||
if (tx.vout.size() != 0) // it may be technically possible for a tx to have no outputs
|
||||
for (uint64_t i = 0; i < tx.vout.size(); ++i)
|
||||
{
|
||||
for (uint64_t i = 0; i < tx.vout.size(); ++i)
|
||||
{
|
||||
add_output(tx_hash, tx.vout[i], i, tx.unlock_time);
|
||||
}
|
||||
add_output(tx_hash, tx.vout[i], i, tx.unlock_time);
|
||||
}
|
||||
|
||||
for (const txin_v& tx_input : tx.vin)
|
||||
for (const txin_v& tx_input : tx.vin)
|
||||
{
|
||||
if (tx_input.type() == typeid(txin_to_key))
|
||||
{
|
||||
if (tx_input.type() == typeid(txin_to_key))
|
||||
{
|
||||
add_spent_key(boost::get<txin_to_key>(tx_input).k_image);
|
||||
}
|
||||
add_spent_key(boost::get<txin_to_key>(tx_input).k_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user