mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
slight cleanup
This commit is contained in:
parent
397497c0f6
commit
8e1239bc6a
3 changed files with 8 additions and 7 deletions
|
|
@ -31,7 +31,11 @@ import (
|
||||||
// has been rewritten.
|
// has been rewritten.
|
||||||
// * the conversion pointers should no longer be necessary,
|
// * the conversion pointers should no longer be necessary,
|
||||||
// remove them when it's been confirmed.
|
// 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 {
|
type TransitionState struct {
|
||||||
CurrentAccountAddress *common.Address // addresss of the last translated account
|
CurrentAccountAddress *common.Address // addresss of the last translated account
|
||||||
CurrentSlotHash common.Hash // hash of the last translated storage slot
|
CurrentSlotHash common.Hash // hash of the last translated storage slot
|
||||||
|
|
|
||||||
|
|
@ -239,8 +239,9 @@ func (db *CachingDB) ReadersWithCacheStats(stateRoot common.Hash) (ReaderWithSta
|
||||||
// OpenTrie opens the main account trie at a specific root hash.
|
// OpenTrie opens the main account trie at a specific root hash.
|
||||||
func (db *CachingDB) OpenTrie(root common.Hash) (Trie, error) {
|
func (db *CachingDB) OpenTrie(root common.Hash) (Trie, error) {
|
||||||
if db.triedb.IsVerkle() {
|
if db.triedb.IsVerkle() {
|
||||||
// if the transition has started, it will be present in the overlay tree,
|
// if the transition has started, the pointers will be present in the
|
||||||
// so we open it regardless.
|
// 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)
|
bt, err := bintrie.NewBinaryTrie(root, db.triedb)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not open the overlay tree: %w", err)
|
return nil, fmt.Errorf("could not open the overlay tree: %w", err)
|
||||||
|
|
|
||||||
|
|
@ -356,10 +356,6 @@ func (s *StateDB) InTransition() bool {
|
||||||
return completeValue != (common.Hash{})
|
return completeValue != (common.Hash{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StateDB) ProcessBinaryTreeTransition(maxSlot uint64) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// TxIndex returns the current transaction index set by SetTxContext.
|
// TxIndex returns the current transaction index set by SetTxContext.
|
||||||
func (s *StateDB) TxIndex() int {
|
func (s *StateDB) TxIndex() int {
|
||||||
return s.txIndex
|
return s.txIndex
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue