slight cleanup

This commit is contained in:
Guillaume Ballet 2026-01-26 15:29:17 +01:00
parent 397497c0f6
commit 8e1239bc6a
3 changed files with 8 additions and 7 deletions

View file

@ -31,7 +31,11 @@ import (
// has been rewritten.
// * the conversion pointers should no longer be necessary,
// remove them when it's been confirmed.
// * we can't keep the preimage offset in the file
// * we can't keep the preimage offset in the file, since
// some clients might decide to record their preimages and
// skip the use of the file altogether. Therefore, they can't
// know what the offset it, unless they keep track of how many
// bytes have been read since the start, which is a possibility.
type TransitionState struct {
CurrentAccountAddress *common.Address // addresss of the last translated account
CurrentSlotHash common.Hash // hash of the last translated storage slot

View file

@ -239,8 +239,9 @@ func (db *CachingDB) ReadersWithCacheStats(stateRoot common.Hash) (ReaderWithSta
// OpenTrie opens the main account trie at a specific root hash.
func (db *CachingDB) OpenTrie(root common.Hash) (Trie, error) {
if db.triedb.IsVerkle() {
// if the transition has started, it will be present in the overlay tree,
// so we open it regardless.
// if the transition has started, the pointers will be present in the
// overlay tree, and the tree itself will be present, so the tree is
// opened and the pointers read, regardless of what comes afterwards.
bt, err := bintrie.NewBinaryTrie(root, db.triedb)
if err != nil {
return nil, fmt.Errorf("could not open the overlay tree: %w", err)

View file

@ -356,10 +356,6 @@ func (s *StateDB) InTransition() bool {
return completeValue != (common.Hash{})
}
func (s *StateDB) ProcessBinaryTreeTransition(maxSlot uint64) {
}
// TxIndex returns the current transaction index set by SetTxContext.
func (s *StateDB) TxIndex() int {
return s.txIndex