mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
wip: DropAllTxs for legacypool
This commit is contained in:
parent
df182a742c
commit
692834ec7a
1 changed files with 13 additions and 0 deletions
|
|
@ -239,6 +239,19 @@ type txpoolResetRequest struct {
|
|||
oldHead, newHead *types.Header
|
||||
}
|
||||
|
||||
func (p *LegacyPool) DropAllTxs() {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
p.all = newLookup()
|
||||
p.priced = newPricedList(p.all)
|
||||
p.pending = make(map[common.Address]*list)
|
||||
p.queue = make(map[common.Address]*list)
|
||||
if !p.config.NoLocals && p.config.Journal != "" {
|
||||
// TODO: do we need to truncate the existing journal here?
|
||||
p.journal = newTxJournal(p.config.Journal)
|
||||
}
|
||||
}
|
||||
|
||||
// New creates a new transaction pool to gather, sort and filter inbound
|
||||
// transactions from the network.
|
||||
func New(config Config, chain BlockChain) *LegacyPool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue