[GetTransaction] remove unneeded cs_main lock acquire

This commit is contained in:
Sebastian Falbesoner
2021-08-01 19:24:49 +02:00
parent b620b2d58a
commit 4a1b2a7ba7

View File

@@ -125,8 +125,6 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t
CTransactionRef GetTransaction(const CBlockIndex* const block_index, const CTxMemPool* const mempool, const uint256& hash, const Consensus::Params& consensusParams, uint256& hashBlock)
{
LOCK(cs_main);
if (mempool && !block_index) {
CTransactionRef ptx = mempool->get(hash);
if (ptx) return ptx;