Documentation ¶
Index ¶
- Constants
- func BlockhashKey(height uint32) []byte
- func CurrentBlockHashKey() []byte
- func CurrentFastSyncRoot() []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 TrieFastSyncRootHeightKey() []byte
- func TrieFastSyncStatusKey() []byte
- func TrieNodeKey(key []byte) []byte
- func TriePrunedHeightKey() []byte
- func TrieRefCountHeightKey() []byte
- func TrieRefCountKey(key []byte) []byte
- func TrieRefCountNeedResetKey() []byte
- func VersionKey() []byte
- type DataEntryPrefix
- type IIterator
- type IStore
- type Iterator
- type LevelDBConfig
- 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 used to compute the size of bloom filter bits array, too small will lead to // high false positive rate. BITSPERKEY = 10 DBConfigSuffix = ".config" )
Variables ¶
This section is empty.
Functions ¶
func BlockhashKey ¶
func CurrentBlockHashKey ¶
func CurrentBlockHashKey() []byte
func CurrentFastSyncRoot ¶ added in v2.1.7
func CurrentFastSyncRoot() []byte
func CurrentStateTrie ¶
func CurrentStateTrie() []byte
func DonationKey ¶
func PrepaidKey ¶
func TransactionKey ¶
func TrieCompactHeightKey ¶
func TrieCompactHeightKey() []byte
func TrieFastSyncRootHeightKey ¶ added in v2.1.7
func TrieFastSyncRootHeightKey() []byte
func TrieFastSyncStatusKey ¶ added in v2.1.7
func TrieFastSyncStatusKey() []byte
func TrieNodeKey ¶
func TriePrunedHeightKey ¶
func TriePrunedHeightKey() []byte
func TrieRefCountHeightKey ¶
func TrieRefCountHeightKey() []byte
func TrieRefCountKey ¶
func TrieRefCountNeedResetKey ¶ added in v2.1.7
func TrieRefCountNeedResetKey() []byte
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 TRIE_FastSyncStatus DataEntryPrefix = 0xa5 TRIE_FastSyncRoot DataEntryPrefix = 0xa6 TRIE_FastSyncRootHeight DataEntryPrefix = 0xa7 TRIE_RefCountNeedReset DataEntryPrefix = 0xa8 )
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 LevelDBConfig ¶ added in v2.0.7
type LevelDBConfig struct { CompactionL0Trigger int WriteL0SlowdownTrigger int WriteL0PauseTrigger int CompactionTableSize int WriteBuffer int BlockCacheCapacity int DisableSeeksCompaction bool }
func NewLevelDBConfig ¶ added in v2.0.7
func NewLevelDBConfig(file string) *LevelDBConfig
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.