Documentation ¶
Index ¶
- Variables
- func WithEpochBasedProviderOptions(opts ...options.Option[iotago.EpochBasedProvider]) options.Option[Permanent]
- type Commitments
- func (c *Commitments) Export(writer io.WriteSeeker, targetSlot iotago.SlotIndex) (err error)
- func (c *Commitments) Import(reader io.ReadSeeker) (err error)
- func (c *Commitments) Load(slot iotago.SlotIndex) (commitment *model.Commitment, err error)
- func (c *Commitments) Rollback(targetSlot iotago.SlotIndex, lastCommittedSlot iotago.SlotIndex) error
- func (c *Commitments) Store(commitment *model.Commitment) error
- type Permanent
- func (p *Permanent) Accounts(optRealm ...byte) kvstore.KVStore
- func (p *Permanent) Commitments() *Commitments
- func (p *Permanent) Flush()
- func (p *Permanent) PruneUTXOLedger(epoch iotago.EpochIndex) error
- func (p *Permanent) Settings() *Settings
- func (p *Permanent) Shutdown()
- func (p *Permanent) Size() int64
- func (p *Permanent) UTXOLedger() *utxoledger.Manager
- type Settings
- func (s *Settings) APIProvider() *iotago.EpochBasedProvider
- func (s *Settings) AdvanceLatestNonEmptySlot(slot iotago.SlotIndex) (err error)
- func (s *Settings) AdvanceLatestStoredSlot(slot iotago.SlotIndex) (err error)
- func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commitment) error
- func (s *Settings) Import(reader io.ReadSeeker) (err error)
- func (s *Settings) IsSnapshotImported() bool
- func (s *Settings) LatestCommitment() *model.Commitment
- func (s *Settings) LatestFinalizedSlot() iotago.SlotIndex
- func (s *Settings) LatestIssuedValidationBlock() *model.Block
- func (s *Settings) LatestNonEmptySlot() iotago.SlotIndex
- func (s *Settings) LatestStoredSlot() iotago.SlotIndex
- func (s *Settings) Rollback(targetCommitment *model.Commitment) error
- func (s *Settings) SetLatestCommitment(latestCommitment *model.Commitment) (err error)
- func (s *Settings) SetLatestFinalizedSlot(slot iotago.SlotIndex) (err error)
- func (s *Settings) SetLatestIssuedValidationBlock(block *model.Block) (err error)
- func (s *Settings) SetLatestNonEmptySlot(slot iotago.SlotIndex) (err error)
- func (s *Settings) SetLatestStoredSlot(slot iotago.SlotIndex) (err error)
- func (s *Settings) SetSnapshotImported() (err error)
- func (s *Settings) StoreFutureProtocolParametersHash(version iotago.Version, hash iotago.Identifier, epoch iotago.EpochIndex) error
- func (s *Settings) StoreProtocolParameters(params iotago.ProtocolParameters) error
- func (s *Settings) StoreProtocolParametersForStartEpoch(params iotago.ProtocolParameters, startEpoch iotago.EpochIndex) error
- func (s *Settings) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCommitmentBeforeGenesis = ierrors.New("commitment is before genesis")
)
Functions ¶
Types ¶
type Commitments ¶
type Commitments struct {
// contains filtered or unexported fields
}
func NewCommitments ¶
func NewCommitments(store kvstore.KVStore, apiProvider iotago.APIProvider) *Commitments
func (*Commitments) Export ¶
func (c *Commitments) Export(writer io.WriteSeeker, targetSlot iotago.SlotIndex) (err error)
func (*Commitments) Import ¶
func (c *Commitments) Import(reader io.ReadSeeker) (err error)
func (*Commitments) Load ¶
func (c *Commitments) Load(slot iotago.SlotIndex) (commitment *model.Commitment, err error)
func (*Commitments) Store ¶
func (c *Commitments) Store(commitment *model.Commitment) error
type Permanent ¶
type Permanent struct {
// contains filtered or unexported fields
}
func New ¶
func New(dbConfig database.Config, errorHandler func(error), opts ...options.Option[Permanent]) *Permanent
New returns a new permanent storage instance.
func (*Permanent) Accounts ¶
Accounts returns the Accounts storage (or a specialized sub-storage if a realm is provided).
func (*Permanent) Commitments ¶
func (p *Permanent) Commitments() *Commitments
func (*Permanent) PruneUTXOLedger ¶
func (p *Permanent) PruneUTXOLedger(epoch iotago.EpochIndex) error
func (*Permanent) UTXOLedger ¶
func (p *Permanent) UTXOLedger() *utxoledger.Manager
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func NewSettings ¶
func (*Settings) APIProvider ¶
func (s *Settings) APIProvider() *iotago.EpochBasedProvider
func (*Settings) AdvanceLatestNonEmptySlot ¶
func (*Settings) AdvanceLatestStoredSlot ¶
func (*Settings) Export ¶
func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commitment) error
func (*Settings) IsSnapshotImported ¶
func (*Settings) LatestCommitment ¶
func (s *Settings) LatestCommitment() *model.Commitment
LatestCommitment returns the last created commitment. This method should not be called often as it reads data from the underlying KVStore. For frequent access, use SyncManager.
func (*Settings) LatestFinalizedSlot ¶
LatestFinalizedSlot returns the last finalized slot. This method should not be called often as it reads data from the underlying KVStore. For frequent access, use SyncManager.
func (*Settings) LatestIssuedValidationBlock ¶
func (*Settings) LatestNonEmptySlot ¶
func (*Settings) LatestStoredSlot ¶
func (*Settings) SetLatestCommitment ¶
func (s *Settings) SetLatestCommitment(latestCommitment *model.Commitment) (err error)
func (*Settings) SetLatestFinalizedSlot ¶
func (*Settings) SetLatestIssuedValidationBlock ¶
func (*Settings) SetLatestNonEmptySlot ¶
func (*Settings) SetLatestStoredSlot ¶
func (*Settings) SetSnapshotImported ¶
func (*Settings) StoreFutureProtocolParametersHash ¶
func (s *Settings) StoreFutureProtocolParametersHash(version iotago.Version, hash iotago.Identifier, epoch iotago.EpochIndex) error
func (*Settings) StoreProtocolParameters ¶
func (s *Settings) StoreProtocolParameters(params iotago.ProtocolParameters) error
func (*Settings) StoreProtocolParametersForStartEpoch ¶
func (s *Settings) StoreProtocolParametersForStartEpoch(params iotago.ProtocolParameters, startEpoch iotago.EpochIndex) error
Click to show internal directories.
Click to hide internal directories.