mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Add lock to mempool.GetTransaction (#1336)
This commit is contained in:
parent
8c8da3b01f
commit
1abffd472c
@ -114,6 +114,8 @@ func New(consensus consensusexternalapi.Consensus, acceptNonStd bool) miningmana
|
||||
|
||||
func (mp *mempool) GetTransaction(
|
||||
transactionID *consensusexternalapi.DomainTransactionID) (*consensusexternalapi.DomainTransaction, bool) {
|
||||
mp.mtx.RLock()
|
||||
defer mp.mtx.RUnlock()
|
||||
|
||||
txDesc, exists := mp.fetchTxDesc(transactionID)
|
||||
if !exists {
|
||||
|
Loading…
x
Reference in New Issue
Block a user