Documentation ¶
Index ¶
- type Batch
- type FullNode
- 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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
GetPrometheusMetrics return the blockchain metrics instance
func NewDummyMetrics ¶ added in v1.2.0
NewDummyMetrics will return the no nil blockchain metrics TODO: use generic replace this in golang 1.18
func NilMetrics ¶ added in v1.2.0
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) AddAccountState ¶ added in v1.2.0
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) Batch() Batch Close() error }
Storage stores the trie
func NewLevelDBStorage ¶
func NewLevelDBStorage(leveldbBuilder kvdb.LevelDBBuilder) (Storage, error)
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.