Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Account(accountID iotago.AccountID, targetSlot iotago.SlotIndex) (accountData *accounts.AccountData, exists bool, err error)
- func (m *Manager) AccountsTreeRoot() iotago.Identifier
- func (m *Manager) AddAccount(output *utxoledger.Output, blockIssuanceCredits iotago.BlockIssuanceCredits) error
- func (m *Manager) ApplyDiff(slot iotago.SlotIndex, rmc iotago.Mana, ...) error
- func (m *Manager) Export(writer io.WriteSeeker, targetIndex iotago.SlotIndex) error
- func (m *Manager) Import(reader io.ReadSeeker) error
- func (m *Manager) LoadSlotDiff(slot iotago.SlotIndex, accountID iotago.AccountID) (*model.AccountDiff, bool, error)
- func (m *Manager) PastAccounts(accountIDs iotago.AccountIDs, targetSlot iotago.SlotIndex) (pastAccounts map[iotago.AccountID]*accounts.AccountData, err error)
- func (m *Manager) Reset()
- func (m *Manager) Rollback(targetSlot iotago.SlotIndex) error
- func (m *Manager) SetLatestCommittedSlot(slot iotago.SlotIndex)
- func (m *Manager) TrackBlock(block *blocks.Block)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager is a Block Issuer Credits module responsible for tracking block issuance credit balances.
func (*Manager) Account ¶
func (m *Manager) Account(accountID iotago.AccountID, targetSlot iotago.SlotIndex) (accountData *accounts.AccountData, exists bool, err error)
Account loads the account's data at a specific slot index.
func (*Manager) AccountsTreeRoot ¶
func (m *Manager) AccountsTreeRoot() iotago.Identifier
AccountsTreeRoot returns the root of the Account tree with all the account ledger data.
func (*Manager) AddAccount ¶
func (m *Manager) AddAccount(output *utxoledger.Output, blockIssuanceCredits iotago.BlockIssuanceCredits) error
AddAccount adds a new account to the Account tree, allotting to it the balance on the given output. The Account will be created associating the given output as the latest state of the account.
func (*Manager) ApplyDiff ¶
func (m *Manager) ApplyDiff( slot iotago.SlotIndex, rmc iotago.Mana, accountDiffs map[iotago.AccountID]*model.AccountDiff, destroyedAccounts ds.Set[iotago.AccountID], ) error
ApplyDiff applies the given accountDiff to the Account tree.
func (*Manager) LoadSlotDiff ¶
func (*Manager) PastAccounts ¶
func (m *Manager) PastAccounts(accountIDs iotago.AccountIDs, targetSlot iotago.SlotIndex) (pastAccounts map[iotago.AccountID]*accounts.AccountData, err error)
PastAccounts loads the past accounts' data at a specific slot index.
func (*Manager) Reset ¶
func (m *Manager) Reset()
Reset resets the component to a clean state as if it was created at the last commitment.
func (*Manager) SetLatestCommittedSlot ¶
func (*Manager) TrackBlock ¶
TrackBlock adds the block to the blockBurns set to deduct the burn from credits upon slot commitment and updates latest supported version of a validation block.