Documentation ¶
Index ¶
- type Block
- func (b *Block) AcceptanceRatifiers() ds.ReadableSet[account.SeatIndex]
- func (b *Block) Accepted() reactive.Variable[bool]
- func (b *Block) AddAcceptanceRatifier(seat account.SeatIndex) (added bool)
- func (b *Block) AddConfirmationRatifier(seat account.SeatIndex) (added bool)
- func (b *Block) AddWitness(seat account.SeatIndex) (added bool)
- func (b *Block) AppendChild(child *Block, childType iotago.ParentsType)
- func (b *Block) BasicBlock() (basicBlock *iotago.BasicBlockBody, isBasicBlock bool)
- func (b *Block) Booked() reactive.Variable[bool]
- func (b *Block) Children() ds.ReadableSet[*Block]
- func (b *Block) ConfirmationRatifiers() ds.ReadableSet[account.SeatIndex]
- func (b *Block) ForEachParent(consumer func(parent iotago.Parent))
- func (b *Block) ID() iotago.BlockID
- func (b *Block) Invalid() (invalid reactive.Variable[bool])
- func (b *Block) IsAccepted() bool
- func (b *Block) IsBasicBlock() bool
- func (b *Block) IsBooked() (isBooked bool)
- func (b *Block) IsConfirmed() bool
- func (b *Block) IsDropped() bool
- func (b *Block) IsEnqueued() bool
- func (b *Block) IsInvalid() (isInvalid bool)
- func (b *Block) IsMissing() (isMissing bool)
- func (b *Block) IsNotarized() (isBooked bool)
- func (b *Block) IsPreAccepted() bool
- func (b *Block) IsPreConfirmed() bool
- func (b *Block) IsRootBlock() bool
- func (b *Block) IsScheduled() bool
- func (b *Block) IsSkipped() bool
- func (b *Block) IsSolid() (isSolid bool)
- func (b *Block) IsValidationBlock() bool
- func (b *Block) IsWeightPropagated() bool
- func (b *Block) IssuerID() iotago.AccountID
- func (b *Block) IssuingTime() time.Time
- func (b *Block) ModelBlock() *model.Block
- func (b *Block) Notarized() reactive.Event
- func (b *Block) Parents() (parents []iotago.BlockID)
- func (b *Block) ParentsWithType() []iotago.Parent
- func (b *Block) Payload() iotago.Payload
- func (b *Block) PayloadSpenderIDs() ds.Set[iotago.TransactionID]
- func (b *Block) PreAccepted() reactive.Variable[bool]
- func (b *Block) ProtocolBlock() *iotago.Block
- func (b *Block) SetAccepted() (wasUpdated bool)
- func (b *Block) SetBooked() (wasUpdated bool)
- func (b *Block) SetConfirmed() (wasUpdated bool)
- func (b *Block) SetDropped() (wasUpdated bool)
- func (b *Block) SetEnqueued() (wasUpdated bool)
- func (b *Block) SetInvalid() (wasUpdated bool)
- func (b *Block) SetNotarized() (wasUpdated bool)
- func (b *Block) SetPayloadSpenderIDs(payloadSpenderIDs ds.Set[iotago.TransactionID])
- func (b *Block) SetPreAccepted() (wasUpdated bool)
- func (b *Block) SetPreConfirmed() (wasUpdated bool)
- func (b *Block) SetScheduled() (wasUpdated bool)
- func (b *Block) SetSkipped() (wasUpdated bool)
- func (b *Block) SetSolid() (wasUpdated bool)
- func (b *Block) SetSpenderIDs(spenderIDs ds.Set[iotago.TransactionID])
- func (b *Block) SetWeightPropagated() (wasUpdated bool)
- func (b *Block) ShallowLikeChildren() []*Block
- func (b *Block) SignedTransaction() (tx *iotago.SignedTransaction, hasTransaction bool)
- func (b *Block) SlotCommitmentID() iotago.CommitmentID
- func (b *Block) Solid() (solid reactive.Variable[bool])
- func (b *Block) SpenderIDs() ds.Set[iotago.TransactionID]
- func (b *Block) String() string
- func (b *Block) StrongChildren() []*Block
- func (b *Block) StrongParents() (parents []iotago.BlockID)
- func (b *Block) Update(modelBlock *model.Block) (wasPublished bool)
- func (b *Block) ValidationBlock() (validationBlock *iotago.ValidationBlockBody, isValidationBlock bool)
- func (b *Block) WaitForPayloadDependencies(dependencies ds.Set[mempool.StateMetadata])
- func (b *Block) WeakChildren() []*Block
- func (b *Block) WeightPropagated() reactive.Variable[bool]
- func (b *Block) WitnessCount() int
- func (b *Block) Witnesses() ds.ReadableSet[account.SeatIndex]
- func (b *Block) WorkScore() iotago.WorkScore
- type Blocks
- func (b *Blocks) Block(id iotago.BlockID) (block *Block, exists bool)
- func (b *Blocks) Evict(slot iotago.SlotIndex)
- func (b *Blocks) GetOrCreate(blockID iotago.BlockID, createFunc func() *Block) (block *Block, created bool)
- func (b *Blocks) Reset()
- func (b *Blocks) StoreBlock(block *Block) (stored bool)
- func (b *Blocks) StoreOrUpdate(modelBlock *model.Block) (storedBlock *Block, evicted bool, updated bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { // ParentsBooked is triggered when all parents of the block are booked. ParentsBooked reactive.Event // PayloadDependenciesAvailable is triggered when the dependencies of the block's payload are available. PayloadDependenciesAvailable reactive.Event // contains filtered or unexported fields }
func NewMissingBlock ¶
func NewRootBlock ¶
func (*Block) AcceptanceRatifiers ¶
func (b *Block) AcceptanceRatifiers() ds.ReadableSet[account.SeatIndex]
func (*Block) Accepted ¶
Accepted returns a reactive variable that is true if the Block was accepted.
func (*Block) AddAcceptanceRatifier ¶
func (*Block) AddConfirmationRatifier ¶
func (*Block) AppendChild ¶
func (b *Block) AppendChild(child *Block, childType iotago.ParentsType)
func (*Block) BasicBlock ¶
func (b *Block) BasicBlock() (basicBlock *iotago.BasicBlockBody, isBasicBlock bool)
func (*Block) Children ¶
func (b *Block) Children() ds.ReadableSet[*Block]
Children returns the children of the Block.
func (*Block) ConfirmationRatifiers ¶
func (b *Block) ConfirmationRatifiers() ds.ReadableSet[account.SeatIndex]
func (*Block) ForEachParent ¶
ForEachParent executes a consumer func for each parent.
func (*Block) Invalid ¶
Invalid returns a reactive variable that is true if the Block was marked as invalid.
func (*Block) IsAccepted ¶
IsAccepted returns true if the Block was accepted.
func (*Block) IsBasicBlock ¶
func (*Block) IsConfirmed ¶
func (*Block) IsEnqueued ¶
IsEnqueued returns true if the Block is currently enqueued in the scheduler.
func (*Block) IsMissing ¶
IsMissing returns a flag that indicates if the underlying Block data hasn't been stored, yet.
func (*Block) IsNotarized ¶
func (*Block) IsPreAccepted ¶
IsPreAccepted returns true if the Block was preAccepted.
func (*Block) IsPreConfirmed ¶
func (*Block) IsRootBlock ¶
func (*Block) IsScheduled ¶
IsScheduled returns true if the Block was scheduled.
func (*Block) IsSolid ¶
IsSolid returns true if the Block is solid (the entire causal history is known).
func (*Block) IsValidationBlock ¶
func (*Block) IsWeightPropagated ¶
func (*Block) IssuingTime ¶
func (*Block) ModelBlock ¶
func (*Block) ParentsWithType ¶
ParentsWithType returns the parents of the block with their type.
func (*Block) PayloadSpenderIDs ¶
func (b *Block) PayloadSpenderIDs() ds.Set[iotago.TransactionID]
func (*Block) PreAccepted ¶
PreAccepted returns a reactive variable that is true if the Block was pre accepted.
func (*Block) ProtocolBlock ¶
func (*Block) SetAccepted ¶
SetAccepted sets the Block as accepted.
func (*Block) SetConfirmed ¶
func (*Block) SetDropped ¶
SetDropped sets the Block as dropped.
func (*Block) SetEnqueued ¶
SetEnqueued sets the Block as enqueued.
func (*Block) SetInvalid ¶
SetInvalid marks the Block as invalid.
func (*Block) SetNotarized ¶
func (*Block) SetPayloadSpenderIDs ¶
func (b *Block) SetPayloadSpenderIDs(payloadSpenderIDs ds.Set[iotago.TransactionID])
func (*Block) SetPreAccepted ¶
SetPreAccepted sets the Block as preAccepted.
func (*Block) SetPreConfirmed ¶
func (*Block) SetScheduled ¶
SetScheduled sets the Block as scheduled.
func (*Block) SetSkipped ¶
SetSkipped sets the Block as skipped.
func (*Block) SetSpenderIDs ¶
func (b *Block) SetSpenderIDs(spenderIDs ds.Set[iotago.TransactionID])
func (*Block) SetWeightPropagated ¶
func (*Block) ShallowLikeChildren ¶
func (*Block) SignedTransaction ¶
func (b *Block) SignedTransaction() (tx *iotago.SignedTransaction, hasTransaction bool)
func (*Block) SlotCommitmentID ¶
func (b *Block) SlotCommitmentID() iotago.CommitmentID
func (*Block) Solid ¶
Solid returns a reactive variable that is true if the Block is solid (the entire causal history is known).
func (*Block) SpenderIDs ¶
func (b *Block) SpenderIDs() ds.Set[iotago.TransactionID]
func (*Block) StrongChildren ¶
func (*Block) StrongParents ¶
func (*Block) Update ¶
Update publishes the given Block data to the underlying Block and marks it as no longer missing.
func (*Block) ValidationBlock ¶
func (b *Block) ValidationBlock() (validationBlock *iotago.ValidationBlockBody, isValidationBlock bool)
func (*Block) WaitForPayloadDependencies ¶
func (b *Block) WaitForPayloadDependencies(dependencies ds.Set[mempool.StateMetadata])
func (*Block) WeakChildren ¶
func (*Block) WitnessCount ¶
type Blocks ¶
type Blocks struct {
// contains filtered or unexported fields
}
func (*Blocks) GetOrCreate ¶
func (*Blocks) Reset ¶
func (b *Blocks) Reset()
Reset resets the component to a clean state as if it was created at the last commitment.