mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 08:24:21 +01:00
[GetTransaction] remove unneeded cs_main lock acquire
This commit is contained in:
@@ -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)
|
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) {
|
if (mempool && !block_index) {
|
||||||
CTransactionRef ptx = mempool->get(hash);
|
CTransactionRef ptx = mempool->get(hash);
|
||||||
if (ptx) return ptx;
|
if (ptx) return ptx;
|
||||||
|
|||||||
Reference in New Issue
Block a user