Documentation
¶
Index ¶
- Constants
- type KVCache
- type StateStore
- func (st *StateStore) Close()
- func (st *StateStore) Commit() sdk.CommitInfo
- func (st *StateStore) Get(key []byte) []byte
- func (st *StateStore) IterateKeyRange(start, end []byte, ascending bool, fn func(key []byte, value []byte) bool) bool
- func (st *StateStore) Query(req abci.RequestQuery) (res abci.ResponseQuery)
- func (st *StateStore) RefreshCache() sdk.Cache
- func (st *StateStore) Set(key, val []byte)
Constants ¶
View Source
const ( CacheSize = 1000 StateDbName = "mstate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVCache ¶
type KVCache struct {
// contains filtered or unexported fields
}
KVCache used by the app. It wraps a simple cache and access to the State Store
func NewCache ¶
func NewCache(store *StateStore) *KVCache
NewCache return a fresh empty cache with ref to the State Store
func (*KVCache) ApplyToState ¶
func (cache *KVCache) ApplyToState()
ApplyToState is called during abci.commit(). It sorts all keys in the cache for determinism, then writes the set to the tree
type StateStore ¶
type StateStore struct {
CommitInfo sdk.CommitInfo
// contains filtered or unexported fields
}
func NewStateStore ¶
func NewStateStore(dbdir string) *StateStore
func (*StateStore) Close ¶
func (st *StateStore) Close()
func (*StateStore) Commit ¶
func (st *StateStore) Commit() sdk.CommitInfo
func (*StateStore) Get ¶
func (st *StateStore) Get(key []byte) []byte
func (*StateStore) IterateKeyRange ¶
func (st *StateStore) IterateKeyRange(start, end []byte, ascending bool, fn func(key []byte, value []byte) bool) bool
IterateKeyRange - iterator non-inclusive
func (*StateStore) Query ¶
func (st *StateStore) Query(req abci.RequestQuery) (res abci.ResponseQuery)
Query returns a value and/or proof from the tree. TODO: This is not really exposed to the app yet via the Query Context
func (*StateStore) RefreshCache ¶
func (st *StateStore) RefreshCache() sdk.Cache
func (*StateStore) Set ¶
func (st *StateStore) Set(key, val []byte)
Click to show internal directories.
Click to hide internal directories.