chain_utils

package
v2.3.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2019 License: GPL-3.0 Imports: 3 Imported by: 12

Documentation

Index

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 BytesToUint64(bytes []byte) uint64

func CreateAccountAddressKey

func CreateAccountAddressKey(addr *types.Address) []byte

func CreateAccountBlockHashKey

func CreateAccountBlockHashKey(blockHash *types.Hash) []byte

====== index db ======

func CreateAccountBlockHeightKey

func CreateAccountBlockHeightKey(addr *types.Address, height uint64) []byte

func CreateAccountIdKey

func CreateAccountIdKey(accountId uint64) []byte

func CreateBalanceKey

func CreateBalanceKey(address types.Address, tokenTypeId types.TokenTypeId) []byte

func CreateBalanceKeyPrefix

func CreateBalanceKeyPrefix(address types.Address) []byte

func CreateCallDepthKey

func CreateCallDepthKey(blockHash types.Hash) []byte

func CreateCodeKey

func CreateCodeKey(address types.Address) []byte

func CreateConfirmHeightKey

func CreateConfirmHeightKey(addr *types.Address, height uint64) []byte

func CreateContractMetaKey

func CreateContractMetaKey(address types.Address) []byte

func CreateGidContractKey

func CreateGidContractKey(gid types.Gid, address *types.Address) []byte

func CreateGidContractPrefixKey

func CreateGidContractPrefixKey(gid *types.Gid) []byte

func CreateHistoryBalanceKey

func CreateHistoryBalanceKey(address types.Address, tokenTypeId types.TokenTypeId, snapshotHeight uint64) []byte

func CreateHistoryStorageValueKey

func CreateHistoryStorageValueKey(address *types.Address, storageKey []byte, snapshotHeight uint64) []byte

func CreateHistoryStorageValueKeyPrefix

func CreateHistoryStorageValueKeyPrefix(address *types.Address, prefix []byte) []byte

func CreateOnRoadKey

func CreateOnRoadKey(toAddr types.Address, blockHash types.Hash) []byte

func CreateReceiveKey

func CreateReceiveKey(sendBlockHash *types.Hash) []byte

func CreateRedoSnapshot

func CreateRedoSnapshot(snapshotHeight uint64) []byte

func CreateSnapshotBlockHashKey

func CreateSnapshotBlockHashKey(snapshotBlockHash *types.Hash) []byte

func CreateSnapshotBlockHeightKey

func CreateSnapshotBlockHeightKey(snapshotBlockHeight uint64) []byte

func CreateStorageValueKey

func CreateStorageValueKey(address *types.Address, storageKey []byte) []byte

func CreateStorageValueKeyPrefix

func CreateStorageValueKeyPrefix(address *types.Address, prefix []byte) []byte

func CreateVmLogListKey

func CreateVmLogListKey(logHash *types.Hash) []byte

func DeserializeLocation

func DeserializeLocation(bytes []byte) *chain_file_manager.Location

func SerializeLocation

func SerializeLocation(location *chain_file_manager.Location) []byte

func Uint64ToBytes

func Uint64ToBytes(height uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL