mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
reduce comment verbosity
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
This commit is contained in:
parent
9a5140a590
commit
b3d3dd70f5
2 changed files with 0 additions and 15 deletions
|
|
@ -33,8 +33,6 @@ var (
|
|||
)
|
||||
|
||||
// StorageReader is a minimal interface for reading contract storage slots.
|
||||
// It is satisfied by *state.flatReader, allowing the transition state to be
|
||||
// loaded without a full state.StateDB.
|
||||
type StorageReader interface {
|
||||
Storage(addr common.Address, slot common.Hash) (common.Hash, error)
|
||||
}
|
||||
|
|
@ -94,9 +92,6 @@ func IsTransitionActive(reader StorageReader) bool {
|
|||
// transition registry system contract storage. Returns nil when the
|
||||
// registry has not been initialised (i.e. the chain has not yet reached the
|
||||
// UBT fork block).
|
||||
//
|
||||
// The root parameter is unused; it is retained on the signature so callers
|
||||
// can express the state version they intend to read.
|
||||
func LoadTransitionState(reader StorageReader) (*TransitionState, error) {
|
||||
started, err := reader.Storage(params.BinaryTransitionRegistryAddress, transitionStartedKey)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@ import (
|
|||
)
|
||||
|
||||
// UBTDatabase is an implementation of Database interface for Unified Binary Trie.
|
||||
//
|
||||
// In its plain form it uses a single binary trie database. During the
|
||||
// MPT-to-binary transition, an optional MPT trie database (mpttriedb) and a
|
||||
// frozen base root provide read-only access to pre-transition state. The
|
||||
// wrapInTransitionTrie flag controls whether reads at this database are
|
||||
// served via a TransitionTrie that overlays the binary trie on the MPT
|
||||
// base; it is normally driven by chainConfig.UBTTransitionActive.
|
||||
type UBTDatabase struct {
|
||||
triedb *triedb.Database
|
||||
mpttriedb *triedb.Database
|
||||
|
|
@ -49,9 +42,6 @@ type UBTDatabase struct {
|
|||
func (db *UBTDatabase) Type() DatabaseType { return TypeUBT }
|
||||
|
||||
// NewUBTDatabase creates a state database with the Unified binary trie manner.
|
||||
// State access is wrapped in a TransitionTrie by default (which degenerates
|
||||
// to a passthrough when there is no MPT base) so callers that don't care
|
||||
// about the override get sensible defaults.
|
||||
func NewUBTDatabase(triedb *triedb.Database, codedb *CodeDB) *UBTDatabase {
|
||||
if codedb == nil {
|
||||
codedb = NewCodeDB(triedb.Disk())
|
||||
|
|
|
|||
Loading…
Reference in a new issue