Documentation ¶
Index ¶
- Constants
- func BytesToUint64(bytes []byte) uint64
- func CreateBalanceKeyPrefix(address types.Address) []byte
- func CreateGidContractPrefixKey(gid *types.Gid) []byte
- func CreateHistoryStorageValueKeyPrefix(address *types.Address, prefix []byte) []byte
- func CreateStorageValueKeyPrefix(address *types.Address, prefix []byte) []byte
- func DeserializeLocation(bytes []byte) *chain_file_manager.Location
- func SerializeLocation(location *chain_file_manager.Location) []byte
- func Uint64Put(bytes []byte, height uint64) []byte
- func Uint64ToBytes(height uint64) []byte
- type AccountAddressKey
- type AccountBlockHashKey
- type AccountBlockHeightKey
- type AccountIdKey
- type BalanceHistoryKey
- func (key *BalanceHistoryKey) AddressRefill(addr types.Address)
- func (key BalanceHistoryKey) Bytes() []byte
- func (key BalanceHistoryKey) Construct(bytes []byte) *BalanceHistoryKey
- func (key BalanceHistoryKey) EqualAddressAndTokenId(addr types.Address, tokenId types.TokenTypeId) bool
- func (key BalanceHistoryKey) ExtraHeight() uint64
- func (key BalanceHistoryKey) ExtraTokenId() types.TokenTypeId
- func (key *BalanceHistoryKey) HeightRefill(height uint64)
- func (key BalanceHistoryKey) String() string
- func (key *BalanceHistoryKey) TokenIdRefill(tokenId types.TokenTypeId)
- type BalanceKey
- type CallDepthKey
- type CodeKey
- type ConfirmHeightKey
- type ContractMetaKey
- type DBKey
- type DBKeyAddressRefill
- type DBKeyBalance
- type DBKeyHashRefill
- type DBKeyHeightRefill
- type DBKeyRealKeyRefill
- type DBKeyStorage
- type DBKeyTokenIdRefill
- type GidContractKey
- type OnRoadKey
- type ReceiveKey
- type SnapshotBlockHashKey
- type SnapshotBlockHeightKey
- type SnapshotKey
- type StorageHistoryKey
- func (key *StorageHistoryKey) AddressRefill(addr types.Address)
- func (key StorageHistoryKey) Bytes() []byte
- func (key StorageHistoryKey) Construct(bytes []byte) *StorageHistoryKey
- func (key StorageHistoryKey) ExtraAddress() types.Address
- func (key StorageHistoryKey) ExtraHeight() uint64
- func (key StorageHistoryKey) ExtraKeyAndLen() []byte
- func (key *StorageHistoryKey) HeightRefill(height uint64)
- func (key *StorageHistoryKey) KeyRefill(real StorageRealKey)
- func (key StorageHistoryKey) String() string
- type StorageKey
- type StorageRealKey
- type VmLogListKey
Constants ¶
View Source
const ( AccountBlockHashKeyPrefix = byte(1) AccountBlockHeightKeyPrefix = byte(2) ReceiveKeyPrefix = byte(3) ConfirmHeightKeyPrefix = byte(4) OnRoadKeyPrefix = byte(5) SnapshotBlockHashKeyPrefix = byte(7) SnapshotBlockHeightKeyPrefix = byte(8) AccountAddressKeyPrefix = byte(9) AccountIdKeyPrefix = byte(10) )
index db
View Source
const ( StorageKeyPrefix = byte(1) StorageHistoryKeyPrefix = byte(2) BalanceKeyPrefix = byte(3) BalanceHistoryKeyPrefix = byte(4) CodeKeyPrefix = byte(5) ContractMetaKeyPrefix = byte(7) GidContractKeyPrefix = byte(9) VmLogListKeyPrefix = byte(10) CallDepthKeyPrefix = byte(11) )
state db
View Source
const (
SnapshotKeyPrefix = byte(1)
)
state redo db
Variables ¶
This section is empty.
Functions ¶
func BytesToUint64 ¶
func CreateBalanceKeyPrefix ¶
func DeserializeLocation ¶
func DeserializeLocation(bytes []byte) *chain_file_manager.Location
func SerializeLocation ¶
func SerializeLocation(location *chain_file_manager.Location) []byte
func Uint64ToBytes ¶
Types ¶
type AccountAddressKey ¶
type AccountAddressKey [1 + types.AddressSize]byte
--------------------------------
func CreateAccountAddressKey ¶
func CreateAccountAddressKey(addr *types.Address) AccountAddressKey
func (*AccountAddressKey) AddressRefill ¶
func (key *AccountAddressKey) AddressRefill(addr types.Address)
func (AccountAddressKey) Bytes ¶
func (key AccountAddressKey) Bytes() []byte
func (AccountAddressKey) String ¶
func (key AccountAddressKey) String() string
type AccountBlockHashKey ¶
-------------------------------
func CreateAccountBlockHashKey ¶
func CreateAccountBlockHashKey(blockHash *types.Hash) AccountBlockHashKey
====== index db ======
func (AccountBlockHashKey) Bytes ¶
func (key AccountBlockHashKey) Bytes() []byte
func (*AccountBlockHashKey) HashRefill ¶
func (key *AccountBlockHashKey) HashRefill(hash types.Hash)
func (AccountBlockHashKey) String ¶
func (key AccountBlockHashKey) String() string
type AccountBlockHeightKey ¶
type AccountBlockHeightKey [1 + types.AddressSize + types.HeightSize]byte
-------------------------------
func CreateAccountBlockHeightKey ¶
func CreateAccountBlockHeightKey(addr *types.Address, height uint64) AccountBlockHeightKey
func (*AccountBlockHeightKey) AddressRefill ¶
func (key *AccountBlockHeightKey) AddressRefill(addr types.Address)
func (AccountBlockHeightKey) Bytes ¶
func (key AccountBlockHeightKey) Bytes() []byte
func (*AccountBlockHeightKey) HeightRefill ¶
func (key *AccountBlockHeightKey) HeightRefill(height uint64)
func (AccountBlockHeightKey) String ¶
func (key AccountBlockHeightKey) String() string
type AccountIdKey ¶
type AccountIdKey [1 + types.AccountIdSize]byte
--------------------------------
func CreateAccountIdKey ¶
func CreateAccountIdKey(accountId uint64) AccountIdKey
func (*AccountIdKey) AccountIdRefill ¶
func (key *AccountIdKey) AccountIdRefill(accountId uint64)
func (AccountIdKey) Bytes ¶
func (key AccountIdKey) Bytes() []byte
func (AccountIdKey) String ¶
func (key AccountIdKey) String() string
type BalanceHistoryKey ¶
type BalanceHistoryKey [1 + types.AddressSize + types.TokenTypeIdSize + types.HeightSize]byte
-------------------------------
func CreateHistoryBalanceKey ¶
func CreateHistoryBalanceKey(address types.Address, tokenTypeId types.TokenTypeId, snapshotHeight uint64) BalanceHistoryKey
func (*BalanceHistoryKey) AddressRefill ¶
func (key *BalanceHistoryKey) AddressRefill(addr types.Address)
func (BalanceHistoryKey) Bytes ¶
func (key BalanceHistoryKey) Bytes() []byte
func (BalanceHistoryKey) Construct ¶
func (key BalanceHistoryKey) Construct(bytes []byte) *BalanceHistoryKey
func (BalanceHistoryKey) EqualAddressAndTokenId ¶
func (key BalanceHistoryKey) EqualAddressAndTokenId(addr types.Address, tokenId types.TokenTypeId) bool
func (BalanceHistoryKey) ExtraHeight ¶
func (key BalanceHistoryKey) ExtraHeight() uint64
func (BalanceHistoryKey) ExtraTokenId ¶
func (key BalanceHistoryKey) ExtraTokenId() types.TokenTypeId
func (*BalanceHistoryKey) HeightRefill ¶
func (key *BalanceHistoryKey) HeightRefill(height uint64)
func (BalanceHistoryKey) String ¶
func (key BalanceHistoryKey) String() string
func (*BalanceHistoryKey) TokenIdRefill ¶
func (key *BalanceHistoryKey) TokenIdRefill(tokenId types.TokenTypeId)
type BalanceKey ¶
type BalanceKey [1 + types.AddressSize + types.TokenTypeIdSize]byte
-------------------------------
func CreateBalanceKey ¶
func CreateBalanceKey(address types.Address, tokenTypeId types.TokenTypeId) BalanceKey
func (*BalanceKey) AddressRefill ¶
func (key *BalanceKey) AddressRefill(addr types.Address)
func (BalanceKey) Bytes ¶
func (key BalanceKey) Bytes() []byte
func (BalanceKey) String ¶
func (key BalanceKey) String() string
func (*BalanceKey) TokenIdRefill ¶
func (key *BalanceKey) TokenIdRefill(tokenId types.TokenTypeId)
type CallDepthKey ¶
-------------------------------
func CreateCallDepthKey ¶
func CreateCallDepthKey(blockHash types.Hash) CallDepthKey
func (CallDepthKey) Bytes ¶
func (key CallDepthKey) Bytes() []byte
func (*CallDepthKey) HashRefill ¶
func (key *CallDepthKey) HashRefill(hash types.Hash)
func (CallDepthKey) String ¶
func (key CallDepthKey) String() string
type CodeKey ¶
type CodeKey [1 + types.AddressSize]byte
-------------------------------
func CreateCodeKey ¶
func (*CodeKey) AddressRefill ¶
type ConfirmHeightKey ¶
type ConfirmHeightKey [1 + types.AddressSize + types.HeightSize]byte
--------------------------------
func CreateConfirmHeightKey ¶
func CreateConfirmHeightKey(addr *types.Address, height uint64) ConfirmHeightKey
func (*ConfirmHeightKey) AddressRefill ¶
func (key *ConfirmHeightKey) AddressRefill(addr types.Address)
func (ConfirmHeightKey) Bytes ¶
func (key ConfirmHeightKey) Bytes() []byte
func (*ConfirmHeightKey) HeightRefill ¶
func (key *ConfirmHeightKey) HeightRefill(height uint64)
func (ConfirmHeightKey) String ¶
func (key ConfirmHeightKey) String() string
type ContractMetaKey ¶
type ContractMetaKey [1 + types.AddressSize]byte
-------------------------------
func CreateContractMetaKey ¶
func CreateContractMetaKey(address types.Address) ContractMetaKey
func (*ContractMetaKey) AddressRefill ¶
func (key *ContractMetaKey) AddressRefill(addr types.Address)
func (ContractMetaKey) Bytes ¶
func (key ContractMetaKey) Bytes() []byte
func (ContractMetaKey) String ¶
func (key ContractMetaKey) String() string
type DBKeyAddressRefill ¶
type DBKeyBalance ¶
type DBKeyBalance interface { DBKey DBKeyAddressRefill DBKeyTokenIdRefill }
type DBKeyHashRefill ¶
type DBKeyHeightRefill ¶
type DBKeyHeightRefill interface {
HeightRefill(height uint64)
}
type DBKeyRealKeyRefill ¶
type DBKeyRealKeyRefill interface {
KeyRefill(real StorageRealKey)
}
type DBKeyStorage ¶
type DBKeyStorage interface { DBKey DBKeyAddressRefill DBKeyRealKeyRefill }
type DBKeyTokenIdRefill ¶
type DBKeyTokenIdRefill interface {
TokenIdRefill(tokenId types.TokenTypeId)
}
type GidContractKey ¶
type GidContractKey [1 + types.GidSize + types.AddressSize]byte
-------------------------------
func CreateGidContractKey ¶
func CreateGidContractKey(gid types.Gid, address *types.Address) GidContractKey
func (*GidContractKey) AddressRefill ¶
func (key *GidContractKey) AddressRefill(addr types.Address)
func (GidContractKey) Bytes ¶
func (key GidContractKey) Bytes() []byte
func (*GidContractKey) GidRefill ¶
func (key *GidContractKey) GidRefill(gid types.Gid)
func (GidContractKey) String ¶
func (key GidContractKey) String() string
type OnRoadKey ¶
type OnRoadKey [1 + types.AddressSize + types.HashSize]byte
--------------------------------
func (*OnRoadKey) AddressRefill ¶
func (*OnRoadKey) HashRefill ¶
type ReceiveKey ¶
-------------------------------
func CreateReceiveKey ¶
func CreateReceiveKey(sendBlockHash *types.Hash) ReceiveKey
func (ReceiveKey) Bytes ¶
func (key ReceiveKey) Bytes() []byte
func (*ReceiveKey) HashRefill ¶
func (key *ReceiveKey) HashRefill(hash types.Hash)
func (ReceiveKey) String ¶
func (key ReceiveKey) String() string
type SnapshotBlockHashKey ¶
--------------------------------
func CreateSnapshotBlockHashKey ¶
func CreateSnapshotBlockHashKey(snapshotBlockHash *types.Hash) SnapshotBlockHashKey
func (SnapshotBlockHashKey) Bytes ¶
func (key SnapshotBlockHashKey) Bytes() []byte
func (*SnapshotBlockHashKey) HashRefill ¶
func (key *SnapshotBlockHashKey) HashRefill(hash types.Hash)
func (SnapshotBlockHashKey) String ¶
func (key SnapshotBlockHashKey) String() string
type SnapshotBlockHeightKey ¶
type SnapshotBlockHeightKey [1 + types.HeightSize]byte
--------------------------------
func CreateSnapshotBlockHeightKey ¶
func CreateSnapshotBlockHeightKey(snapshotBlockHeight uint64) SnapshotBlockHeightKey
func (SnapshotBlockHeightKey) Bytes ¶
func (key SnapshotBlockHeightKey) Bytes() []byte
func (*SnapshotBlockHeightKey) HeightRefill ¶
func (key *SnapshotBlockHeightKey) HeightRefill(height uint64)
func (SnapshotBlockHeightKey) String ¶
func (key SnapshotBlockHeightKey) String() string
type SnapshotKey ¶
type SnapshotKey [1 + types.HeightSize]byte
-------------------------------
func CreateRedoSnapshot ¶
func CreateRedoSnapshot(snapshotHeight uint64) SnapshotKey
func (SnapshotKey) Bytes ¶
func (key SnapshotKey) Bytes() []byte
func (*SnapshotKey) HeightRefill ¶
func (key *SnapshotKey) HeightRefill(height uint64)
func (SnapshotKey) String ¶
func (key SnapshotKey) String() string
type StorageHistoryKey ¶
type StorageHistoryKey [1 + types.AddressSize + types.HashSize + 1 + types.HeightSize]byte
-------------------------------
func CreateHistoryStorageValueKey ¶
func CreateHistoryStorageValueKey(address *types.Address, storageKey []byte, snapshotHeight uint64) StorageHistoryKey
func (*StorageHistoryKey) AddressRefill ¶
func (key *StorageHistoryKey) AddressRefill(addr types.Address)
func (StorageHistoryKey) Bytes ¶
func (key StorageHistoryKey) Bytes() []byte
func (StorageHistoryKey) Construct ¶
func (key StorageHistoryKey) Construct(bytes []byte) *StorageHistoryKey
func (StorageHistoryKey) ExtraAddress ¶
func (key StorageHistoryKey) ExtraAddress() types.Address
func (StorageHistoryKey) ExtraHeight ¶
func (key StorageHistoryKey) ExtraHeight() uint64
func (StorageHistoryKey) ExtraKeyAndLen ¶
func (key StorageHistoryKey) ExtraKeyAndLen() []byte
func (*StorageHistoryKey) HeightRefill ¶
func (key *StorageHistoryKey) HeightRefill(height uint64)
func (*StorageHistoryKey) KeyRefill ¶
func (key *StorageHistoryKey) KeyRefill(real StorageRealKey)
func (StorageHistoryKey) String ¶
func (key StorageHistoryKey) String() string
type StorageKey ¶
type StorageKey [1 + types.AddressSize + types.HashSize + 1]byte
-------------------------------
func CreateStorageValueKey ¶
func CreateStorageValueKey(address *types.Address, storageKey []byte) StorageKey
func (*StorageKey) AddressRefill ¶
func (key *StorageKey) AddressRefill(addr types.Address)
func (StorageKey) Bytes ¶
func (key StorageKey) Bytes() []byte
func (*StorageKey) KeyLenRefill ¶
func (key *StorageKey) KeyLenRefill(len int)
func (*StorageKey) KeyRefill ¶
func (key *StorageKey) KeyRefill(real StorageRealKey)
func (*StorageKey) StorageKeyRefill ¶
func (key *StorageKey) StorageKeyRefill(bytes []byte)
func (StorageKey) String ¶
func (key StorageKey) String() string
type StorageRealKey ¶
type StorageRealKey struct {
// contains filtered or unexported fields
}
func (StorageRealKey) Construct ¶
func (key StorageRealKey) Construct(real []byte) StorageRealKey
func (StorageRealKey) ConstructFix ¶
func (key StorageRealKey) ConstructFix(all []byte) StorageRealKey
func (StorageRealKey) Extra ¶
func (key StorageRealKey) Extra() []byte
func (StorageRealKey) String ¶
func (key StorageRealKey) String() string
type VmLogListKey ¶
-------------------------------
func CreateVmLogListKey ¶
func CreateVmLogListKey(logHash *types.Hash) VmLogListKey
func (VmLogListKey) Bytes ¶
func (key VmLogListKey) Bytes() []byte
func (*VmLogListKey) HashRefill ¶
func (key *VmLogListKey) HashRefill(hash types.Hash)
func (VmLogListKey) String ¶
func (key VmLogListKey) String() string
Click to show internal directories.
Click to hide internal directories.