Documentation ¶
Index ¶
- func CopyTrie(nodeHash []byte, storage Storage, newStorage Storage, agg []byte, ...) error
- func HashChecker(stateRoot []byte, storage Storage) (types.Hash, error)
- type Batch
- type FullNode
- type KVBatch
- type KVStorage
- type Node
- type Putter
- type ShortNode
- type Snapshot
- func (s *Snapshot) Commit(objs []*state.Object) (state.Snapshot, []byte)
- func (s *Snapshot) GetAccount(addr types.Address) (*state.Account, error)
- func (s *Snapshot) GetCode(hash types.Hash) ([]byte, bool)
- func (s *Snapshot) GetStorage(addr types.Address, root types.Hash, rawkey types.Hash) types.Hash
- type State
- type Storage
- type Trie
- type Txn
- type ValueNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FullNode ¶
type FullNode struct {
// contains filtered or unexported fields
}
FullNode is a node with several children
type KVBatch ¶
type KVBatch struct {
// contains filtered or unexported fields
}
KVBatch is a batch write for leveldb
type KVStorage ¶
type KVStorage struct {
// contains filtered or unexported fields
}
KVStorage is a k/v storage on memory using leveldb
type ShortNode ¶
type ShortNode struct {
// contains filtered or unexported fields
}
ShortNode is an extension or short node
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func (*Snapshot) GetAccount ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) NewSnapshot ¶
func (*State) NewSnapshotAt ¶
type Storage ¶
type Storage interface { Put(k, v []byte) Get(k []byte) ([]byte, bool) Batch() Batch SetCode(hash types.Hash, code []byte) GetCode(hash types.Hash) ([]byte, bool) Close() error }
Storage stores the trie
func NewLevelDBStorage ¶
func NewMemoryStorage ¶
func NewMemoryStorage() Storage
NewMemoryStorage creates an inmemory trie storage
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
func NewTrieWithRoot ¶
Click to show internal directories.
Click to hide internal directories.