Documentation ¶
Index ¶
- type FullNode
- type KVStorage
- func (kv *KVStorage) Batch() ethdb.Batch
- func (kv *KVStorage) Close() error
- func (kv *KVStorage) Get(k []byte) ([]byte, bool, error)
- func (kv *KVStorage) GetCode(hash types.Hash) ([]byte, bool)
- func (kv *KVStorage) Set(k []byte, v []byte) error
- func (kv *KVStorage) SetCode(hash types.Hash, code []byte) error
- type Metrics
- type Node
- type Putter
- type ShortNode
- type State
- func (s *State) AddAccountState(root types.Hash, t *Trie)
- func (s *State) AddTrieState(root types.Hash, t *Trie)
- func (s *State) GetCode(hash types.Hash) ([]byte, bool)
- func (s *State) NewSnapshot() state.Snapshot
- func (s *State) NewSnapshotAt(root types.Hash) (state.Snapshot, error)
- func (s *State) SetCode(hash types.Hash, code []byte) error
- type Storage
- type Trie
- type Txn
- type ValueNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FullNode ¶
type FullNode struct {
// contains filtered or unexported fields
}
FullNode is a node with several children
type Metrics ¶
type Metrics struct { CodeLruCacheHit metrics.Counter CodeLruCacheMiss metrics.Counter CodeLruCacheRead metrics.Counter CodeLruCacheWrite metrics.Counter AccountStateLruCacheHit metrics.Counter TrieStateLruCacheHit metrics.Counter StateLruCacheMiss metrics.Counter }
Metrics represents the itrie metrics
func GetPrometheusMetrics ¶
GetPrometheusMetrics return the blockchain metrics instance
func NewDummyMetrics ¶
NewDummyMetrics will return the no nil blockchain metrics TODO: use generic replace this in golang 1.18
func NilMetrics ¶
func NilMetrics() *Metrics
NilMetrics will return the non operational blockchain metrics
type ShortNode ¶
type ShortNode struct {
// contains filtered or unexported fields
}
ShortNode is an extension or short node
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) NewSnapshot ¶
func (*State) NewSnapshotAt ¶
type Storage ¶
type Storage interface { Set(k, v []byte) error Get(k []byte) ([]byte, bool, error) SetCode(hash types.Hash, code []byte) error GetCode(hash types.Hash) ([]byte, bool) Close() error Batch() ethdb.Batch }
func NewKVStorage ¶
func NewMemoryStorage ¶
func NewMemoryStorage() Storage
NewMemoryStorage creates an inmemory trie storage
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.