GetTxStatus returns a transaction status if it is contained in the pool and nil otherwise.
(hash common.Uint256)
| 176 | // GetTxStatus returns a transaction status if it is contained in the pool |
| 177 | // and nil otherwise. |
| 178 | func (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. |
| 193 | func (tp *TXPool) GetTransactionCount() int { |