Documentation
¶
Index ¶
- Variables
- type Batch
- type FullNode
- type Metrics
- type MetricsTimeendRecord
- type Node
- type NodePool
- type ShortNode
- type Snapshot
- func (s *Snapshot) Commit(objs []*state.Object) (state.Snapshot, []byte, error)
- 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, error)
- type StateDB
- type StateDBReader
- type StateDBTransaction
- type Storage
- type StorageReader
- type StorageWriter
- type Trie
- type Txn
- type ValueNode
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStateTransactionIsCancel = errors.New("transaction is cancel")
)
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch interface { StorageWriter Commit() error }
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 interface {
// contains filtered or unexported methods
}
func GetPrometheusMetrics ¶ added in v1.2.0
func GetPrometheusMetrics(namespace string, trackingIOTimer bool, labelsWithValues ...string) Metrics
GetPrometheusMetrics return the blockchain metrics instance
func NilMetrics ¶ added in v1.2.0
func NilMetrics() Metrics
NilMetrics will return the non operational blockchain metrics
type MetricsTimeendRecord ¶ added in v1.2.2
type MetricsTimeendRecord func()
type NodePool ¶ added in v1.2.2
type NodePool struct {
// contains filtered or unexported fields
}
func NewNodePool ¶ added in v1.2.2
func NewNodePool() *NodePool
func (*NodePool) GetFullNode ¶ added in v1.2.2
func (*NodePool) GetShortNode ¶ added in v1.2.2
func (*NodePool) GetValueNode ¶ added in v1.2.2
type ShortNode ¶
type ShortNode struct {
// contains filtered or unexported fields
}
ShortNode is an extension or short node
type Snapshot ¶ added in v1.2.4
type Snapshot struct {
// contains filtered or unexported fields
}
func (*Snapshot) GetAccount ¶ added in v1.2.4
type StateDB ¶ added in v1.2.2
type StateDB interface { StateDBReader Transaction(execute func(st StateDBTransaction) error) error GetMetrics() Metrics Logger() hclog.Logger }
func NewStateDB ¶ added in v1.2.2
type StateDBReader ¶ added in v1.2.2
type StateDBTransaction ¶ added in v1.2.2
type Storage ¶
type Storage interface { StorageReader StorageWriter NewBatch() 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 StorageReader ¶ added in v1.2.2
Storage stores the trie
type StorageWriter ¶ added in v1.2.2
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
func (*Trie) Hash ¶
Hash returns the root hash of the trie. It does not write to the database and can be used even if the trie doesn't have one.
func (*Trie) Txn ¶
func (t *Trie) Txn(reader StateDBReader) *Txn
Txn returns a txn using current db instance
Trie will not hold this db instance
Click to show internal directories.
Click to hide internal directories.