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

Method GetTxStatus

txnpool/common/transaction_pool.go:178–190  ·  view source on GitHub ↗

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

(hash common.Uint256)

Source from the content-addressed store, hash-verified

176// GetTxStatus returns a transaction status if it is contained in the pool
177// and nil otherwise.
178func (tp *TXPool) GetTxStatus(hash common.Uint256) *TxStatus {
179 tp.RLock()
180 defer tp.RUnlock()
181 txEntry, ok := tp.txList[hash]
182 if !ok {
183 return nil
184 }
185 ret := &TxStatus{
186 Hash: hash,
187 Attrs: txEntry.Attrs,
188 }
189 return ret
190}
191
192// GetTransactionCount returns the tx number of the pool.
193func (tp *TXPool) GetTransactionCount() int {

Callers 1

TestTxPoolFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTxPoolFunction · 0.76