core/txpool/blobpool: reset counters and gapped on Clear

Clear was only used in tests, but it was missing some of the
cleanup.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2026-02-06 11:49:45 +01:00
parent a951aacb70
commit 4fe68d6254
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -2096,6 +2096,11 @@ func (p *BlobPool) Clear() {
p.index = make(map[common.Address][]*blobTxMeta)
p.spent = make(map[common.Address]*uint256.Int)
// Reset counters and the gapped buffer
p.stored = 0
p.gapped = make(map[common.Address][]*types.Transaction)
p.gappedSource = make(map[common.Hash]common.Address)
var (
basefee = uint256.MustFromBig(eip1559.CalcBaseFee(p.chain.Config(), p.head.Load()))
blobfee = uint256.NewInt(params.BlobTxMinBlobGasprice)