aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-31 13:51:48 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-01 15:51:24 +0000
commit4f005a77c24d91f9f292530d928913263553fcc2 (patch)
treeedbf40c700c1b842096f6fa8b60fd4b244ca8a89
parentperf_timer: call reserve on new timer array (diff)
downloadmonero-4f005a77c24d91f9f292530d928913263553fcc2.tar.xz
tx_pool: remove unnecessary get_transaction_hash
-rw-r--r--src/cryptonote_core/tx_pool.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index d51c84594..a31c9d3ed 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -290,10 +290,9 @@ namespace cryptonote
{
CRITICAL_REGION_LOCAL1(m_blockchain);
LockedTXN lock(m_blockchain);
- const crypto::hash txid = get_transaction_hash(tx);
- m_blockchain.remove_txpool_tx(txid);
- m_blockchain.add_txpool_tx(txid, blob, meta);
- if (!insert_key_images(tx, txid, kept_by_block))
+ m_blockchain.remove_txpool_tx(id);
+ m_blockchain.add_txpool_tx(id, blob, meta);
+ if (!insert_key_images(tx, id, kept_by_block))
return false;
m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(fee / (double)tx_weight, receive_time), id);
}