Skip to content

Commit 7352993

Browse files
committed
fix failing tests
1 parent 9d2db92 commit 7352993

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

consensus/beacon/consensus.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, hea
382382
// This step needs to happen as late as possible to catch all access events.
383383
if chain.Config().IsVerkle(header.Number, header.Time) {
384384
// TODO(gballet) move this to the end of the overlay conversion function in a subsequent PR
385-
statedb.Database().SaveTransitionState(header.Root, &state.TransitionState{Ended: true})
385+
statedb.Database().(*state.CachingDB).SaveTransitionState(header.Root, &state.TransitionState{Ended: true})
386386
keys := statedb.AccessEvents().Keys()
387387

388388
// Open the pre-tree to prove the pre-state against

core/genesis.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ func (g *Genesis) chainConfigOrDefault(ghash common.Hash, stored *params.ChainCo
470470
// IsVerkle indicates whether the state is already stored in a verkle
471471
// tree at genesis time.
472472
func (g *Genesis) IsVerkle() bool {
473-
return g.Config.VerkleTime != nil && *g.Config.VerkleTime == g.Timestamp
473+
return g != nil && g.Config != nil && g.Config.VerkleTime != nil && *g.Config.VerkleTime == g.Timestamp
474474
}
475475

476476
// ToBlock returns the genesis block according to genesis specification.

core/state/database.go

-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ type Database interface {
6666

6767
// Snapshot returns the underlying state snapshot.
6868
Snapshot() *snapshot.Tree
69-
70-
// SaveTransitionState saves the tree transition progress markers to the database.
71-
SaveTransitionState(common.Hash, *TransitionState)
72-
73-
// LoadTransitionState loads the tree transition progress markers from the database.
74-
LoadTransitionState(common.Hash) *TransitionState
7569
}
7670

7771
// Trie is a Ethereum Merkle Patricia trie.

core/state/statedb.go

-1
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,6 @@ func (s *StateDB) commitAndFlush(block uint64, deleteEmptyObjects bool, noStorag
12751275
return nil, err
12761276
}
12771277
}
1278-
s.db.SaveTransitionState(ret.root, &TransitionState{Ended: true})
12791278
if !ret.empty() {
12801279
// If snapshotting is enabled, update the snapshot tree with this new version
12811280
if snap := s.db.Snapshot(); snap != nil && snap.Snapshot(ret.originRoot) != nil {

0 commit comments

Comments
 (0)