Documentation
¶
Index ¶
- Constants
- type Input
- type LatestSequencerTipData
- type LatestSequencerTipDataJSONAble
- type SequencerTips
- func (t *SequencerTips) GetKnownLatestSequencerDataJSONAble() map[string]LatestSequencerTipDataJSONAble
- func (t *SequencerTips) GetLatestActiveMilestone(seqID ledger.ChainID) *vertex.WrappedTx
- func (t *SequencerTips) LatestActiveMilestonesDescending(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
- func (t *SequencerTips) LatestActiveMilestonesShuffled(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
- func (t *SequencerTips) NumSequencerTips() int
Constants ¶
View Source
const ( Name = "tippool" TraceTag = Name )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LatestSequencerTipData ¶
type LatestSequencerTipData struct { LatestMilestoneTxID ledger.TransactionID LastBranchTxID *ledger.TransactionID MilestoneCount int LastActivity time.Time }
type SequencerTips ¶
type SequencerTips struct { *work_process.WorkProcess[Input] // contains filtered or unexported fields }
SequencerTips is a collection with input queue, which keeps all latest sequencer transactions for each sequencer ID. One transaction per sequencer TODO input queue is not very much needed because TPS of sequencer transactions is low
func New ¶
func New(env environment) *SequencerTips
func (*SequencerTips) GetKnownLatestSequencerDataJSONAble ¶
func (t *SequencerTips) GetKnownLatestSequencerDataJSONAble() map[string]LatestSequencerTipDataJSONAble
func (*SequencerTips) GetLatestActiveMilestone ¶
func (t *SequencerTips) GetLatestActiveMilestone(seqID ledger.ChainID) *vertex.WrappedTx
GetLatestActiveMilestone will return nil if sequencer is not in the list
func (*SequencerTips) LatestActiveMilestonesDescending ¶
func (t *SequencerTips) LatestActiveMilestonesDescending(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
LatestActiveMilestonesDescending returns sequencer transactions from sequencer tippool. Optionally filters Sorts in the descending preference order (essentially by ledger coverage)
func (*SequencerTips) LatestActiveMilestonesShuffled ¶
func (t *SequencerTips) LatestActiveMilestonesShuffled(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
LatestActiveMilestonesShuffled returns sequencer transactions from sequencer tippool. Optionally filters. Randomizes order
func (*SequencerTips) NumSequencerTips ¶
func (t *SequencerTips) NumSequencerTips() int
Click to show internal directories.
Click to hide internal directories.