aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/blockchain_db.cpp')
-rw-r--r--src/cryptonote_core/blockchain_db.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain_db.cpp b/src/cryptonote_core/blockchain_db.cpp
index 439cf5ded..5e781af79 100644
--- a/src/cryptonote_core/blockchain_db.cpp
+++ b/src/cryptonote_core/blockchain_db.cpp
@@ -107,6 +107,9 @@ void BlockchainDB::remove_transaction(const crypto::hash& tx_hash)
{
transaction tx = get_tx(tx_hash);
+ // TODO: This loop calling remove_output() should be removed. It doesn't do
+ // anything (function is empty), and the outputs were already intended to be
+ // removed later as part of remove_transaction_data().
for (const tx_out& tx_output : tx.vout)
{
remove_output(tx_output);
@@ -120,7 +123,8 @@ void BlockchainDB::remove_transaction(const crypto::hash& tx_hash)
}
}
- remove_transaction_data(tx_hash);
+ // need tx as tx.vout has the tx outputs, and the output amounts are needed
+ remove_transaction_data(tx_hash, tx);
}
} // namespace cryptonote