triedb/pathdb: fix panic

This commit is contained in:
Gary Rong 2026-03-20 11:24:37 +08:00
parent 4e7b3fed6d
commit 902c680a83
2 changed files with 3 additions and 1 deletions

View file

@ -38,7 +38,7 @@ const (
// being released and re-opened. Long-lived iterators hold a read snapshot
// that blocks LSM compaction; periodically re-opening avoids stalling the
// compactor during a large scan.
iteratorReopenInterval = 3 * time.Minute
iteratorReopenInterval = 30 * time.Second
)
// indexPruner is responsible for pruning stale index data from the tail side

View file

@ -23,6 +23,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
)
func writeMultiBlockIndex(t *testing.T, db ethdb.Database, ident stateIdent, bitmapSize int, startID uint64) []*indexBlockDesc {
@ -278,6 +279,7 @@ func TestPrunePauseResume(t *testing.T) {
pruner := &indexPruner{
disk: db,
typ: typeStateHistory,
log: log.New("type", "account"),
closed: make(chan struct{}),
pauseReq: make(chan chan struct{}),
resumeCh: make(chan struct{}),