Skip to content

Commit

Permalink
fix: NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Mar 13, 2024
1 parent 6b2985a commit d77f7a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/txpool/bundlepool/bundlepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ func (p *BundlePool) reset(newHead *types.Header) {
// deleteBundle deletes a bundle from the pool.
// It assumes that the caller holds the pool's lock.
func (p *BundlePool) deleteBundle(hash common.Hash) {
if p.bundles[hash] == nil {
return
}

p.slots -= numSlots(p.bundles[hash])
delete(p.bundles, hash)
}
Expand Down

0 comments on commit d77f7a4

Please sign in to comment.