Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NamespaceStateTrie = []byte("st") NamespaceRollupBlockTrie = []byte("rbt") NamespaceTokenAddressToTokenIndex = []byte("tatti") NamespaceTokenIndexToTokenAddress = []byte("titta") NamespaceMainchainTokenAddressToSidechainTokenAddress = []byte("mtatst") NamespaceAccountAddressToKey = []byte("aatk") NamespaceLastKey = []byte("lk") NamespaceKeyToAccountInfo = []byte("ktai") NamespaceRollupBlockNumber = []byte("rbn") EmptyKey = []byte{} Separator = []byte("|") )
Functions ¶
func ConvNilToBytes ¶
func PrependNamespace ¶
Types ¶
type Bulk ¶
type Bulk interface { Set(namespace []byte, key []byte, value []byte) error Delete(namespace []byte, key []byte) error Flush() error DiscardLast() }
Bulk is used to batch multiple transactions This will internally commit transactions when reach maximum tx size
type DB ¶
type DB interface { Type() string Set(namespace []byte, key []byte, value []byte) error Delete(namespace []byte, key []byte) error Get(namespace []byte, key []byte) ([]byte, bool, error) Exist(namespace []byte, key []byte) (bool, error) Iterator(start []byte, end []byte) Iterator NewTx() Transaction NewBulk() Bulk Close() error }
DB is an general interface to access at storage data
Click to show internal directories.
Click to hide internal directories.