Documentation ¶
Overview ¶
Package store store the world - state data
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyRoot [32]byte
EmptyRoot mavl树空的根hash
Functions ¶
Types ¶
type BaseStore ¶
type BaseStore struct {
// contains filtered or unexported fields
}
BaseStore 基础的store结构体
func NewBaseStore ¶
NewBaseStore new base store struct
func (*BaseStore) GetQueueClient ¶
GetQueueClient 返回store模块的client
func (*BaseStore) SetQueueClient ¶
SetQueueClient set client queue for recv msg
type Storecreate ¶
Storecreate store queue module
type StorelistQuery ¶
type StorelistQuery struct { *types.StoreListReply // contains filtered or unexported fields }
StorelistQuery defines a type store list query
func NewStoreListQuery ¶
func NewStoreListQuery(store SubStore, req *types.StoreList) *StorelistQuery
NewStoreListQuery new store list query object
func (*StorelistQuery) IterateCallBack ¶
func (t *StorelistQuery) IterateCallBack(key, value []byte) bool
IterateCallBack store list query iterate callback
func (*StorelistQuery) Run ¶
func (t *StorelistQuery) Run() *types.StoreListReply
Run store list query
type SubStore ¶
type SubStore interface { Set(datas *types.StoreSet, sync bool) ([]byte, error) Get(datas *types.StoreGet) [][]byte MemSet(datas *types.StoreSet, sync bool) ([]byte, error) Commit(hash *types.ReqHash) ([]byte, error) Rollback(req *types.ReqHash) ([]byte, error) Del(req *types.StoreDel) ([]byte, error) IterateRangeByStateHash(statehash []byte, start []byte, end []byte, ascending bool, fn func(key, value []byte) bool) ProcEvent(msg *queue.Message) //用升级本地交易构建store MemSetUpgrade(datas *types.StoreSet, sync bool) ([]byte, error) CommitUpgrade(hash *types.ReqHash) ([]byte, error) }
SubStore store db的操作接口
Click to show internal directories.
Click to hide internal directories.