Documentation ¶
Index ¶
- type AccountDiffs
- func (b *AccountDiffs) Clear() error
- func (b *AccountDiffs) Delete(accountID iotago.AccountID) (err error)
- func (b *AccountDiffs) Has(accountID iotago.AccountID) (has bool, err error)
- func (b *AccountDiffs) Load(accountID iotago.AccountID) (accountDiff *model.AccountDiff, destroyed bool, err error)
- func (b *AccountDiffs) Slot() iotago.SlotIndex
- func (b *AccountDiffs) Store(accountID iotago.AccountID, accountDiff *model.AccountDiff, destroyed bool) (err error)
- func (b *AccountDiffs) Stream(...) error
- func (b *AccountDiffs) StreamDestroyed(consumer func(accountID iotago.AccountID) bool) error
- type BlockMetadata
- type BlockMetadataStore
- type Blocks
- func (b *Blocks) Clear() error
- func (b *Blocks) Delete(id iotago.BlockID) (err error)
- func (b *Blocks) ForEachBlockInSlot(consumer func(block *model.Block) error) error
- func (b *Blocks) Load(id iotago.BlockID) (*model.Block, error)
- func (b *Blocks) Store(block *model.Block) error
- func (b *Blocks) StreamKeys(consumer func(blockID iotago.BlockID) error) error
- type Store
- func (s *Store[K, V]) Delete(key K) (err error)
- func (s *Store[K, V]) Has(key K) (has bool, err error)
- func (s *Store[K, V]) Load(key K) (value V, exists bool, err error)
- func (s *Store[K, V]) Store(key K, value V) error
- func (s *Store[K, V]) Stream(consumer func(key K, value V) error) error
- func (s *Store[K, V]) StreamBytes(consumer func([]byte, []byte) error) error
- func (s *Store[K, V]) StreamKeys(consumer func(key K) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDiffs ¶
type AccountDiffs struct {
// contains filtered or unexported fields
}
AccountDiffs is the storable unit of Account changes for all account in a slot.
func NewAccountDiffs ¶
NewAccountDiffs creates a new AccountDiffs instance.
func (*AccountDiffs) Clear ¶
func (b *AccountDiffs) Clear() error
func (*AccountDiffs) Delete ¶
func (b *AccountDiffs) Delete(accountID iotago.AccountID) (err error)
Delete deletes the given accountID from the root blocks.
func (*AccountDiffs) Has ¶
func (b *AccountDiffs) Has(accountID iotago.AccountID) (has bool, err error)
Has returns true if the given accountID is a root block.
func (*AccountDiffs) Load ¶
func (b *AccountDiffs) Load(accountID iotago.AccountID) (accountDiff *model.AccountDiff, destroyed bool, err error)
Load loads accountID and commitmentID for the given blockID.
func (*AccountDiffs) Slot ¶
func (b *AccountDiffs) Slot() iotago.SlotIndex
func (*AccountDiffs) Store ¶
func (b *AccountDiffs) Store(accountID iotago.AccountID, accountDiff *model.AccountDiff, destroyed bool) (err error)
Store stores the given accountID as a root block.
func (*AccountDiffs) Stream ¶
func (b *AccountDiffs) Stream(consumer func(accountID iotago.AccountID, accountDiff *model.AccountDiff, destroyed bool) bool) error
Stream streams all accountIDs changes for a slot index.
func (*AccountDiffs) StreamDestroyed ¶
func (b *AccountDiffs) StreamDestroyed(consumer func(accountID iotago.AccountID) bool) error
StreamDestroyed streams all destroyed accountIDs for a slot index.
type BlockMetadata ¶
type BlockMetadata struct {
State api.BlockState
}
func (*BlockMetadata) Bytes ¶
func (b *BlockMetadata) Bytes() ([]byte, error)
type BlockMetadataStore ¶
type BlockMetadataStore struct {
// contains filtered or unexported fields
}
func NewBlockMetadataStore ¶
func NewBlockMetadataStore(slot iotago.SlotIndex, store kvstore.KVStore) *BlockMetadataStore
func (*BlockMetadataStore) BlockMetadata ¶
func (r *BlockMetadataStore) BlockMetadata(blockID iotago.BlockID) (*BlockMetadata, error)
func (*BlockMetadataStore) StoreBlockMetadata ¶
func (r *BlockMetadataStore) StoreBlockMetadata(blockID iotago.BlockID, state api.BlockState) error
type Blocks ¶
type Blocks struct {
// contains filtered or unexported fields
}
func (*Blocks) ForEachBlockInSlot ¶
type Store ¶
type Store[K, V any] struct { // contains filtered or unexported fields }
func NewStore ¶
func NewStore[K, V any]( slot iotago.SlotIndex, kv kvstore.KVStore, keyToBytes kvstore.ObjectToBytes[K], bytesToKey kvstore.BytesToObject[K], vToBytes kvstore.ObjectToBytes[V], bytesToV kvstore.BytesToObject[V], ) *Store[K, V]
func (*Store[K, V]) StreamBytes ¶
func (*Store[K, V]) StreamKeys ¶
Click to show internal directories.
Click to hide internal directories.