Documentation ¶
Index ¶
- Constants
- Variables
- type IState
- type KvStash
- type NameString
- type Ops
- type SpmtKV
- func (skv *SpmtKV) Commit() ([]byte, error)
- func (skv *SpmtKV) Delete(triName NameString, key []byte)
- func (skv *SpmtKV) Discard()
- func (skv *SpmtKV) DiscardAll()
- func (skv *SpmtKV) Exist(triName NameString, key []byte) bool
- func (skv *SpmtKV) FinalizeBlock(block *types.Block)
- func (skv *SpmtKV) Get(triName NameString, key []byte) ([]byte, error)
- func (skv *SpmtKV) GetByBlockHash(triName NameString, key []byte, block *types.Block) ([]byte, error)
- func (skv *SpmtKV) GetFinalized(triName NameString, key []byte) ([]byte, error)
- func (skv *SpmtKV) NextTxn()
- func (skv *SpmtKV) Set(triName NameString, key, value []byte)
- func (skv *SpmtKV) StartBlock(block *types.Block)
- type TxnStashes
Constants ¶
View Source
const ( SpmtIndex = "spmt-index" Nodes = "spmt-nodes" Values = "spmt-values" )
View Source
const ( SetOp = iota DeleteOp )
Variables ¶
View Source
var (
EmptyRoot = HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
)
Functions ¶
This section is empty.
Types ¶
type IState ¶
type IState interface { Set(triName NameString, key, value []byte) Delete(triName NameString, key []byte) Get(triName NameString, key []byte) ([]byte, error) GetFinalized(triName NameString, key []byte) ([]byte, error) Exist(triName NameString, key []byte) bool GetByBlockHash(triName NameString, key []byte, block *types.Block) ([]byte, error) Commit() ([]byte, error) NextTxn() Discard() DiscardAll() StartBlock(block *types.Block) FinalizeBlock(block *types.Block) }
TODO: need to add prove() and verify()
func NewStateDB ¶
type NameString ¶
type NameString interface {
Name() string
}
type SpmtKV ¶
type SpmtKV struct {
// contains filtered or unexported fields
}
func (*SpmtKV) Delete ¶
func (skv *SpmtKV) Delete(triName NameString, key []byte)
func (*SpmtKV) DiscardAll ¶
func (skv *SpmtKV) DiscardAll()
func (*SpmtKV) FinalizeBlock ¶
func (*SpmtKV) GetByBlockHash ¶
func (skv *SpmtKV) GetByBlockHash(triName NameString, key []byte, block *types.Block) ([]byte, error)
FIXME
func (*SpmtKV) GetFinalized ¶
func (skv *SpmtKV) GetFinalized(triName NameString, key []byte) ([]byte, error)
func (*SpmtKV) Set ¶
func (skv *SpmtKV) Set(triName NameString, key, value []byte)
func (*SpmtKV) StartBlock ¶
type TxnStashes ¶
type TxnStashes struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.