Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractManager ¶
type ContractManager interface { // UpdateChainState atomically updates the blockchain state of the // contract manager. UpdateChainState(tx contracts.UpdateStateTx, reverted []chain.RevertUpdate, applied []chain.ApplyUpdate) error // ProcessActions is called after the chain state is updated to // trigger additional actions related to contract lifecycle management. // This operation should not assume that it will be called for every // block. During syncing, it will be called at most once per batch. ProcessActions(index types.ChainIndex) error }
A ContractManager manages the lifecycle and state of storage contracts
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
A Manager manages the state of the blockchain and indexes consensus changes.
func NewManager ¶
func NewManager(store Store, chain *chain.Manager, contracts ContractManager, wallet WalletManager, settings SettingsManager, volumes VolumeManager, opts ...Option) (*Manager, error)
NewManager creates a new Manager.
type Option ¶
type Option func(*Manager)
An Option is a functional option for the Manager.
func WithBatchSize ¶
WithBatchSize sets the batch size for chain updates.
type SettingsManager ¶
type SettingsManager interface { // UpdateChainState atomically updates the blockchain state of the // settings manager. UpdateChainState(tx settings.UpdateStateTx, reverted []chain.RevertUpdate, applied []chain.ApplyUpdate) error // ProcessActions is called after the chain state is updated to // trigger additional actions related to settings management. // This operation should not assume that it will be called for every // block. During syncing, it will be called at most once per batch. ProcessActions(index types.ChainIndex) error }
A SettingsManager manages the host's settings and announcements
type Store ¶
type Store interface { // ResetChainState resets the consensus state of the store. This // should only occur if the user has reset their consensus database to // sync from scratch. ResetChainState() error UpdateChainState(func(UpdateTx) error) error Tip() (types.ChainIndex, error) }
A Store is a persistent store for the index manager.
type UpdateTx ¶
type UpdateTx interface { wallet.UpdateTx contracts.UpdateStateTx settings.UpdateStateTx SetLastIndex(types.ChainIndex) error }
An UpdateTx is a transaction that atomically updates the state of the index manager.
type VolumeManager ¶
type VolumeManager interface { // ProcessActions is called to trigger additional actions related to // volume management. This operation should not assume that it will be // called for every block. During syncing, it will be called at most // once per batch ProcessActions(index types.ChainIndex) error }
A VolumeManager manages the host's storage volumes
type WalletManager ¶
type WalletManager interface { // UpdateChainState atomically updates the blockchain state of the // wallet manager. UpdateChainState(tx wallet.UpdateTx, reverted []chain.RevertUpdate, applied []chain.ApplyUpdate) error }
A WalletManager manages the host's UTXOs and balance
Click to show internal directories.
Click to hide internal directories.