Remove deletes a transaction from the maintained list, returning whether the transaction was found, and also returning any transaction invalidated due to the deletion (strict mode only).
(tx *types.Transaction)
| 374 | // transaction was found, and also returning any transaction invalidated due to |
| 375 | // the deletion (strict mode only). |
| 376 | func (l *txList) Remove(tx *types.Transaction) (bool, types.Transactions) { |
| 377 | // Remove the transaction from the set |
| 378 | nonce := tx.Nonce() |
| 379 | if removed := l.txs.Remove(nonce); !removed { |
| 380 | return false, nil |
| 381 | } |
| 382 | // In strict mode, filter out non-executable transactions |
| 383 | if l.strict { |
| 384 | return true, l.txs.Filter(func(tx *types.Transaction) bool { return tx.Nonce() > nonce }) |
| 385 | } |
| 386 | return true, nil |
| 387 | } |
| 388 | |
| 389 | // Ready retrieves a sequentially increasing list of transactions starting at the |
| 390 | // provided nonce that is ready for processing. The returned transactions will be |