tx_pool: remove unnecessary get_transaction_hash

This commit is contained in:
moneromooo-monero 2018-10-31 13:51:48 +00:00
parent 593ef5981d
commit 4f005a77c2
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 3 additions and 4 deletions

View File

@ -290,10 +290,9 @@ namespace cryptonote
{ {
CRITICAL_REGION_LOCAL1(m_blockchain); CRITICAL_REGION_LOCAL1(m_blockchain);
LockedTXN lock(m_blockchain); LockedTXN lock(m_blockchain);
const crypto::hash txid = get_transaction_hash(tx); m_blockchain.remove_txpool_tx(id);
m_blockchain.remove_txpool_tx(txid); m_blockchain.add_txpool_tx(id, blob, meta);
m_blockchain.add_txpool_tx(txid, blob, meta); if (!insert_key_images(tx, id, kept_by_block))
if (!insert_key_images(tx, txid, kept_by_block))
return false; return false;
m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(fee / (double)tx_weight, receive_time), id); m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(fee / (double)tx_weight, receive_time), id);
} }