blockchain_db: store key images for tx without outputs too

This commit is contained in:
moneromooo-monero 2015-08-09 19:26:36 +01:00
parent 9c3715e46a
commit 533acc30ed
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 7 additions and 10 deletions

View File

@ -60,8 +60,6 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti
// iterate tx.vout using indices instead of C++11 foreach syntax because // iterate tx.vout using indices instead of C++11 foreach syntax because
// we need the index // 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);
@ -75,7 +73,6 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti
} }
} }
} }
}
uint64_t BlockchainDB::add_block( const block& blk uint64_t BlockchainDB::add_block( const block& blk
, const size_t& block_size , const size_t& block_size