diff options
author | Howard Chu <hyc@symas.com> | 2016-04-05 21:13:16 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-04-05 21:13:16 +0100 |
commit | d7ea7d9a23cd71bbba4d6e2822f54257432b3f01 (patch) | |
tree | 8cdf85a24dcf11114c6715cced198ac87cebea0d /src/blockchain_db/blockchain_db.cpp | |
parent | Merge pull request #780 (diff) | |
parent | Cleanup (diff) | |
download | monero-d7ea7d9a23cd71bbba4d6e2822f54257432b3f01.tar.xz |
Merge branch 'performance' into master
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_db/blockchain_db.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index a66f4a403..68f635d18 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -82,14 +82,17 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti } } - add_transaction_data(blk_hash, tx, tx_hash); + uint64_t tx_id = add_transaction_data(blk_hash, tx, tx_hash); + + std::vector<uint64_t> amount_output_indices; // iterate tx.vout using indices instead of C++11 foreach syntax because // we need the index for (uint64_t i = 0; i < tx.vout.size(); ++i) { - add_output(tx_hash, tx.vout[i], i, tx.unlock_time); + amount_output_indices.push_back(add_output(tx_hash, tx.vout[i], i, tx.unlock_time)); } + add_tx_amount_output_indices(tx_id, amount_output_indices); } uint64_t BlockchainDB::add_block( const block& blk |