Documentation ¶
Index ¶
- type AccountDiffs
- 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) 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 BlockRetainerData
- 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 Retainer
- func (r *Retainer) DeleteTransactionData(prevID iotago.BlockID) error
- func (r *Retainer) GetBlock(blockID iotago.BlockID) (*BlockRetainerData, bool)
- func (r *Retainer) GetTransaction(blockID iotago.BlockID) (*TransactionRetainerData, bool)
- func (r *Retainer) StoreBlockAccepted(blockID iotago.BlockID) error
- func (r *Retainer) StoreBlockAttached(blockID iotago.BlockID) error
- func (r *Retainer) StoreBlockConfirmed(blockID iotago.BlockID) error
- func (r *Retainer) StoreBlockFailure(blockID iotago.BlockID, failureType api.BlockFailureReason) error
- func (r *Retainer) StoreTransactionFailure(blockID iotago.BlockID, failureType api.TransactionFailureReason) error
- func (r *Retainer) StoreTransactionNoFailureStatus(blockID iotago.BlockID, status api.TransactionState) error
- func (r *Retainer) StoreTransactionPending(blockID iotago.BlockID) 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
- type TransactionRetainerData
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) 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) 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 BlockRetainerData ¶
type BlockRetainerData struct { State api.BlockState FailureReason api.BlockFailureReason }
func BlockRetainerDataFromBytes ¶
func BlockRetainerDataFromBytes(bytes []byte) (*BlockRetainerData, int, error)
func (*BlockRetainerData) Bytes ¶
func (b *BlockRetainerData) Bytes() ([]byte, error)
type Blocks ¶
type Blocks struct {
// contains filtered or unexported fields
}
func (*Blocks) ForEachBlockInSlot ¶
type Retainer ¶
type Retainer struct {
// contains filtered or unexported fields
}
func NewRetainer ¶
func (*Retainer) DeleteTransactionData ¶
func (*Retainer) GetBlock ¶
func (r *Retainer) GetBlock(blockID iotago.BlockID) (*BlockRetainerData, bool)
func (*Retainer) GetTransaction ¶
func (r *Retainer) GetTransaction(blockID iotago.BlockID) (*TransactionRetainerData, bool)
func (*Retainer) StoreBlockAccepted ¶
func (*Retainer) StoreBlockAttached ¶
func (*Retainer) StoreBlockConfirmed ¶
func (*Retainer) StoreBlockFailure ¶
func (*Retainer) StoreTransactionFailure ¶
func (*Retainer) StoreTransactionNoFailureStatus ¶
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 ¶
type TransactionRetainerData ¶
type TransactionRetainerData struct { TransactionID iotago.TransactionID State api.TransactionState FailureReason api.TransactionFailureReason }
func TransactionRetainerDataFromBytes ¶
func TransactionRetainerDataFromBytes(bytes []byte) (*TransactionRetainerData, int, error)
func (*TransactionRetainerData) Bytes ¶
func (t *TransactionRetainerData) Bytes() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.