diff options
author | Howard Chu <hyc@symas.com> | 2016-04-04 02:10:58 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-04-05 20:57:45 +0100 |
commit | 591e421875988ea63313a7da22062f62f06b30ab (patch) | |
tree | 8582bb1ff8a899f6927b3781c93533a16c2c878c /src/blockchain_db/blockchain_db.cpp | |
parent | Use cursors in some remove functions (diff) | |
download | monero-591e421875988ea63313a7da22062f62f06b30ab.tar.xz |
Cleanup and clarify
Try to rationalize the variable names, document usage.
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_db/blockchain_db.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index 8cde4f138..68f635d18 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -82,21 +82,17 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti } } - uint64_t tx_index = 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; - std::vector<uint64_t> global_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) { - uint64_t amount_output_index, global_output_index; - add_output(tx_hash, tx.vout[i], i, tx.unlock_time, amount_output_index, global_output_index); - amount_output_indices.push_back(amount_output_index); - global_output_indices.push_back(global_output_index); + amount_output_indices.push_back(add_output(tx_hash, tx.vout[i], i, tx.unlock_time)); } - add_amount_and_global_output_indices(tx_index, amount_output_indices, global_output_indices); + add_tx_amount_output_indices(tx_id, amount_output_indices); } uint64_t BlockchainDB::add_block( const block& blk |