Documentation ¶
Index ¶
- Variables
- func AccountIndexChunkKey(key []byte, blockNumber uint64) []byte
- func AvailableFrom(tx kv.Tx) (uint64, error)
- func AvailableStorageFrom(tx kv.Tx) (uint64, error)
- func DecodeAccounts(dbKey, dbValue []byte) (uint64, []byte, []byte, error)
- func DecodeStorage(dbKey, dbValue []byte) (uint64, []byte, []byte, error)
- func EncodeAccounts(blockN uint64, s *ChangeSet, f func(k, v []byte) error) error
- func EncodeStorage(blockN uint64, s *ChangeSet, f func(k, v []byte) error) error
- func FindAccount(c kv.CursorDupSort, blockNumber uint64, key []byte) ([]byte, error)
- func FindByHistory(indexC kv.Cursor, changesC kv.CursorDupSort, storage bool, key []byte, ...) ([]byte, bool, error)
- func FindStorage(c kv.CursorDupSort, blockNumber uint64, k []byte) ([]byte, error)
- func ForEach(db kv.Tx, bucket string, startkey []byte, ...) error
- func ForPrefix(db kv.Tx, bucket string, startkey []byte, ...) error
- func FromDBFormat(dbKey, dbValue []byte) (uint64, []byte, []byte, error)
- func StorageIndexChunkKey(key []byte, blockNumber uint64) []byte
- func Truncate(tx kv.RwTx, from uint64) error
- type CSMapper
- type Change
- type ChangeSet
- type Decoder
- type Encoder
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
View Source
var Mapper = map[string]CSMapper{ kv.AccountChangeSet: { IndexBucket: kv.E2AccountsHistory, IndexChunkKey: AccountIndexChunkKey, New: NewAccountChangeSet, Find: FindAccount, Encode: EncodeAccounts, Decode: DecodeAccounts, }, kv.StorageChangeSet: { IndexBucket: kv.E2StorageHistory, IndexChunkKey: StorageIndexChunkKey, Find: FindStorage, New: NewStorageChangeSet, Encode: EncodeStorage, Decode: DecodeStorage, }, }
Functions ¶
func AccountIndexChunkKey ¶
func EncodeAccounts ¶
func EncodeStorage ¶
func FindAccount ¶
func FindByHistory ¶
func FindStorage ¶
func FromDBFormat ¶
Encoded Method
func StorageIndexChunkKey ¶
Types ¶
type ChangeSet ¶
type ChangeSet struct { // Invariant: all keys are of the same size. Changes []Change // contains filtered or unexported fields }
ChangeSet is a map with keys of the same size. Both keys and values are byte strings.
func NewAccountChangeSet ¶
func NewAccountChangeSet() *ChangeSet
func NewChangeSet ¶
func NewChangeSet() *ChangeSet
func NewStorageChangeSet ¶
func NewStorageChangeSet() *ChangeSet
func (*ChangeSet) Add ¶
Add adds a new entry to the AccountChangeSet. One must not add an existing key and may add keys only of the same size.
func (*ChangeSet) ChangedKeys ¶
Click to show internal directories.
Click to hide internal directories.