fix: recover TestStateChanges
This commit is contained in:
parent
fdfc6371f6
commit
9f5842e0ec
@ -51,9 +51,6 @@ issues:
|
||||
- path: core/state/metrics.go
|
||||
linters:
|
||||
- unused
|
||||
- path: core/state/statedb_fuzz_test.go
|
||||
linters:
|
||||
- unused
|
||||
- path: core/txpool/legacypool/list.go
|
||||
linters:
|
||||
- staticcheck
|
||||
|
@ -1180,8 +1180,7 @@ func (bc *BlockChain) Stop() {
|
||||
// - HEAD-127: So we have a hard limit on the number of blocks reexecuted
|
||||
if !bc.cacheConfig.TrieDirtyDisabled {
|
||||
triedb := bc.triedb
|
||||
var once sync.Once
|
||||
|
||||
var once sync.Once
|
||||
for _, offset := range []uint64{0, 1, TriesInMemory - 1} {
|
||||
if number := bc.CurrentBlock().Number.Uint64(); number > offset {
|
||||
recent := bc.GetBlockByNumber(number - offset)
|
||||
@ -1191,9 +1190,9 @@ func (bc *BlockChain) Stop() {
|
||||
} else {
|
||||
rawdb.WriteSafePointBlockNumber(bc.db, recent.NumberU64())
|
||||
once.Do(func() {
|
||||
rawdb.WriteHeadBlockHash(bc.db, recent.Hash())
|
||||
rawdb.WriteHeadBlockHash(bc.db, recent.Hash())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if snapBase != (common.Hash{}) {
|
||||
|
@ -379,8 +379,7 @@ func (test *stateTest) verify(root common.Hash, next common.Hash, db *trie.Datab
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO(Nathan): enable this case after enabling pbss
|
||||
func testStateChanges(t *testing.T) {
|
||||
func TestStateChanges(t *testing.T) {
|
||||
config := &quick.Config{MaxCount: 1000}
|
||||
err := quick.Check((*stateTest).run, config)
|
||||
if cerr, ok := err.(*quick.CheckError); ok {
|
||||
|
Loading…
Reference in New Issue
Block a user