MCPcopy Create free account
hub / github.com/DNAProject/DNA / GetTransaction

Method GetTransaction

txnpool/common/transaction_pool.go:167–174  ·  view source on GitHub ↗

GetTransaction returns a transaction if it is contained in the pool and nil otherwise.

(hash common.Uint256)

Source from the content-addressed store, hash-verified

165// GetTransaction returns a transaction if it is contained in the pool
166// and nil otherwise.
167func (tp *TXPool) GetTransaction(hash common.Uint256) *types.Transaction {
168 tp.RLock()
169 defer tp.RUnlock()
170 if tx := tp.txList[hash]; tx == nil {
171 return nil
172 }
173 return tp.txList[hash].Tx
174}
175
176// GetTxStatus returns a transaction status if it is contained in the pool
177// and nil otherwise.

Callers 1

TestTxPoolFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTxPoolFunction · 0.76