From 9afb491d800817ca17aec0255391e0ab2c33981e Mon Sep 17 00:00:00 2001 From: q Date: Sat, 24 Jan 2026 16:52:18 +0800 Subject: [PATCH] fix bug --- core/txpool/blobpool/limbo.go | 36 +++++------------------------------ 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/core/txpool/blobpool/limbo.go b/core/txpool/blobpool/limbo.go index 1dc6fb2107..b2cbc50eb6 100644 --- a/core/txpool/blobpool/limbo.go +++ b/core/txpool/blobpool/limbo.go @@ -31,11 +31,11 @@ import ( // to which it belongs as well as the block number in which it was included for // finality eviction. type limboBlob struct { - TxHash common.Hash // Owner transaction's hash to support resurrecting reorged txs - Block uint64 // Block in which the blob transaction was included - Tx *types.Transaction - TxMeta *blobTxMeta `rlp:"omitempty"` // Optional blob transaction metadata. - id uint64 // the billy id of limboBlob + TxHash common.Hash // Owner transaction's hash to support resurrecting reorged txs + Block uint64 // Block in which the blob transaction was included + Tx *types.Transaction `rlp:"nil"` // Optional full blob transaction (old storage style) + TxMeta *blobTxMeta // the blob transaction metadata. + id uint64 // the billy id of limboBlob } // limbo is a light, indexed database to temporarily store recently included @@ -86,13 +86,6 @@ func newLimbo(config *params.ChainConfig, datadir string) (*limbo, error) { } } - // Migrate any old-style limbo entries which stored full blob transactions - // instead of just the metadata. - if err = l.cleanTxStorage(); err != nil { - l.Close() - return nil, err - } - return l, nil } @@ -125,25 +118,6 @@ func (l *limbo) parseBlob(id uint64, data []byte) error { return nil } -// cleanTxStorage migrates any old-style limbo entries which stored the full -// blob transaction instead of just the metadata. -func (l *limbo) cleanTxStorage() error { - for _, item := range l.index { - if item.Tx == nil { - continue - } - // Delete the old item which hash blob tx content. - if err := l.drop(item.TxMeta.hash); err != nil { - return err - } - // Set the new one which has blob tx metadata. - if err := l.push(item.TxMeta, item.Block); err != nil { - return err - } - } - return nil -} - // finalize evicts all blobs belonging to a recently finalized block or older. func (l *limbo) finalize(final *types.Header, fn func(id uint64, txHash common.Hash)) { // Just in case there's no final block yet (network not yet merged, weird