tx_pool: remove unnecessary get_transaction_hash

pull/127/head
moneromooo-monero 6 years ago
parent 593ef5981d
commit 4f005a77c2
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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);
}

Loading…
Cancel
Save