Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImmutableTree ¶
type ImmutableTree struct {
// contains filtered or unexported fields
}
ImmutableTree used for CheckState: API and CheckTx calls.
func (*ImmutableTree) Get ¶
func (t *ImmutableTree) Get(key []byte) (index int64, value []byte)
Get returns the index and value of the specified key if it exists, or nil and the next index otherwise. The returned value must not be modified, since it may point to data stored within IAVL.
func (*ImmutableTree) Iterate ¶
func (t *ImmutableTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool)
Iterate iterates over all keys of the tree, in order. The keys and values must not be modified, since they may point to data stored within IAVL.
func (*ImmutableTree) Version ¶
func (t *ImmutableTree) Version() int64
Version returns the version of the tree.
type MTree ¶ added in v1.2.0
type MTree interface {
ReadOnlyTree
KeepLastHeight() int64
AvailableVersions() []int
Set(key, value []byte) bool
Remove(key []byte) ([]byte, bool)
LoadVersion(targetVersion int64) (int64, error)
LazyLoadVersion(targetVersion int64) (int64, error)
SaveVersion() ([]byte, int64, error)
DeleteVersionsIfExists(from, to int64) error
DeleteVersionIfExists(version int64) error
GetImmutable() *ImmutableTree
GetImmutableAtHeight(version int64) (*ImmutableTree, error)
GlobalLock()
GlobalUnlock()
}
MTree mutable tree, used for txs delivery
func NewImmutableTree ¶
NewImmutableTree returns MTree from given db at given height Warning: returns the MTree interface, but you should only use ReadOnlyTree
Click to show internal directories.
Click to hide internal directories.