diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 2d4298d726..16bad1e922 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -1715,14 +1715,14 @@ func (p *BlobPool) Status(hash common.Hash) txpool.TxStatus { return txpool.TxStatusUnknown } -// DropTransactions implements txpool.SubPool, removing all tracked transactions +// Clear implements txpool.SubPool, removing all tracked transactions // from the blob pool and persistent store. -func (p *BlobPool) DropTransactions() { +func (p *BlobPool) Clear() { p.lock.Lock() defer p.lock.Unlock() // manually iterating and deleting every entry is super sub-optimal - // However, DropTransactions is not currently used in production so + // However, Clear is not currently used in production so // performance is not critical at the moment. for _, entry := range p.lookup { if err := p.store.Delete(entry); err != nil { diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 94fe846371..7e3f40f31a 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -1962,9 +1962,9 @@ func numSlots(tx *types.Transaction) int { return int((tx.Size() + txSlotSize - 1) / txSlotSize) } -// DropTransactions implements txpool.SubPool, removing all tracked txs from the pool +// Clear implements txpool.SubPool, removing all tracked txs from the pool // and rotating the journal. -func (p *LegacyPool) DropTransactions() { +func (p *LegacyPool) Clear() { p.mu.Lock() defer p.mu.Unlock() diff --git a/core/txpool/subpool.go b/core/txpool/subpool.go index f9312a101b..9ee0a69c0b 100644 --- a/core/txpool/subpool.go +++ b/core/txpool/subpool.go @@ -169,6 +169,6 @@ type SubPool interface { // identified by their hashes. Status(hash common.Hash) TxStatus - // DropTransactions removes all tracked transactions from the pool - DropTransactions() + // Clear removes all tracked transactions from the pool + Clear() } diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 90058d15bd..ce455e806e 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -498,9 +498,9 @@ func (p *TxPool) Sync() error { } } -// DropTransactions removes all tracked txs from the subpools. -func (p *TxPool) DropTransactions() { +// Clear removes all tracked txs from the subpools. +func (p *TxPool) Clear() { for _, subpool := range p.subpools { - subpool.DropTransactions() + subpool.Clear() } } diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index 056ab633a5..a24ff52101 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -285,7 +285,7 @@ func (c *SimulatedBeacon) Commit() common.Hash { // Rollback un-sends previously added transactions. func (c *SimulatedBeacon) Rollback() { - c.eth.TxPool().DropTransactions() + c.eth.TxPool().Clear() } // Fork sets the head to the provided hash.