aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.cpp
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-05-27 11:33:08 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-05-27 11:33:08 +0300
commitbc4584c1ff6dc54653c780864f36a867855c992e (patch)
treef4819579e573bbd48daad96fc963d1e8583fb473 /src/blockchain_db/blockchain_db.cpp
parentinstalling wallet_api header (diff)
parentMerge pull request #842 (diff)
downloadmonero-bc4584c1ff6dc54653c780864f36a867855c992e.tar.xz
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/blockchain_db.cpp7
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