Documentation ¶
Index ¶
- Constants
- func BlockhashKey(height uint32) []byte
- func CurrentBlockHashKey() []byte
- func CurrentStateTrie() []byte
- func DonationKey(height uint32) []byte
- func HeaderKey(blockHash common.Uint256) []byte
- func PrepaidKey(programHash common.Uint160) []byte
- func TransactionKey(txHash common.Uint256) []byte
- func TrieCompactHeightKey() []byte
- func TrieNodeKey(key []byte) []byte
- func TriePrunedHeightKey() []byte
- func TrieRefCountHeightKey() []byte
- func TrieRefCountKey(key []byte) []byte
- func VersionKey() []byte
- type DataEntryPrefix
- type IIterator
- type IStore
- type Iterator
- type LevelDBStore
- func (self *LevelDBStore) BatchCommit() error
- func (self *LevelDBStore) BatchDelete(key []byte) error
- func (self *LevelDBStore) BatchPut(key []byte, value []byte) error
- func (self *LevelDBStore) Close() error
- func (self *LevelDBStore) Compact() error
- func (self *LevelDBStore) Delete(key []byte) error
- func (self *LevelDBStore) Get(key []byte) ([]byte, error)
- func (self *LevelDBStore) Has(key []byte) (bool, error)
- func (self *LevelDBStore) NewBatch() error
- func (self *LevelDBStore) NewIterator(prefix []byte) IIterator
- func (self *LevelDBStore) Put(key []byte, value []byte) error
Constants ¶
View Source
const BITSPERKEY = 10
used to compute the size of bloom filter bits array . too small will lead to high false positive rate.
Variables ¶
This section is empty.
Functions ¶
func BlockhashKey ¶
func CurrentBlockHashKey ¶
func CurrentBlockHashKey() []byte
func CurrentStateTrie ¶
func CurrentStateTrie() []byte
func DonationKey ¶
func PrepaidKey ¶
func TransactionKey ¶
func TrieCompactHeightKey ¶
func TrieCompactHeightKey() []byte
func TrieNodeKey ¶
func TriePrunedHeightKey ¶
func TriePrunedHeightKey() []byte
func TrieRefCountHeightKey ¶
func TrieRefCountHeightKey() []byte
func TrieRefCountKey ¶
func VersionKey ¶
func VersionKey() []byte
Types ¶
type DataEntryPrefix ¶
type DataEntryPrefix byte
const ( // DATA DATA_BlockHash DataEntryPrefix = 0x00 DATA_Header DataEntryPrefix = 0x01 DATA_Transaction DataEntryPrefix = 0x02 ST_Prepaid DataEntryPrefix = 0xc7 ST_StateTrie DataEntryPrefix = 0xc8 //SYSTEM SYS_CurrentBlock DataEntryPrefix = 0x40 SYS_Donations DataEntryPrefix = 0x42 //CONFIG CFG_Version DataEntryPrefix = 0xf0 //TRIE TRIE_Node DataEntryPrefix = 0xa0 TRIE_RefCount DataEntryPrefix = 0xa1 TRIE_RefCountHeight DataEntryPrefix = 0xa2 TRIE_PrunedHeight DataEntryPrefix = 0xa3 TRIE_CompactHeight DataEntryPrefix = 0xa4 )
type IStore ¶
type IStore interface { Put(key []byte, value []byte) error Get(key []byte) ([]byte, error) Has(key []byte) (bool, error) Delete(key []byte) error NewBatch() error BatchPut(key []byte, value []byte) error BatchDelete(key []byte) error BatchCommit() error Compact() error Close() error NewIterator(prefix []byte) IIterator }
type LevelDBStore ¶
type LevelDBStore struct {
// contains filtered or unexported fields
}
func NewLevelDBStore ¶
func NewLevelDBStore(file string) (*LevelDBStore, error)
func (*LevelDBStore) BatchCommit ¶
func (self *LevelDBStore) BatchCommit() error
func (*LevelDBStore) BatchDelete ¶
func (self *LevelDBStore) BatchDelete(key []byte) error
func (*LevelDBStore) Close ¶
func (self *LevelDBStore) Close() error
func (*LevelDBStore) Compact ¶
func (self *LevelDBStore) Compact() error
func (*LevelDBStore) Delete ¶
func (self *LevelDBStore) Delete(key []byte) error
func (*LevelDBStore) NewBatch ¶
func (self *LevelDBStore) NewBatch() error
func (*LevelDBStore) NewIterator ¶
func (self *LevelDBStore) NewIterator(prefix []byte) IIterator
Click to show internal directories.
Click to hide internal directories.