Documentation ¶
Index ¶
- Constants
- type Environment
- type MilestoneFactory
- func (mf *MilestoneFactory) AddOwnMilestone(vid *vertex.WrappedTx)
- func (mf *MilestoneFactory) AttachTagAlongInputs(a *attacher.IncrementalAttacher) (numInserted int)
- func (mf *MilestoneFactory) BestCoverageInTheSlot(targetTs ledger.Time) uint64
- func (mf *MilestoneFactory) ChooseExtendEndorsePair(proposerName string, targetTs ledger.Time) *attacher.IncrementalAttacher
- func (mf *MilestoneFactory) CurrentTargetTs() ledger.Time
- func (mf *MilestoneFactory) NumMilestones() int
- func (mf *MilestoneFactory) NumOutputsInBuffer() int
- func (mf *MilestoneFactory) OwnLatestMilestoneOutput() vertex.WrappedOutput
- func (mf *MilestoneFactory) Propose(a *attacher.IncrementalAttacher, strategyName string) error
- func (mf *MilestoneFactory) StartProposingForTargetLogicalTime(targetTs ledger.Time) (*transaction.Transaction, *txmetadata.TransactionMetadata)
- type Stats
Constants ¶
View Source
const ( TraceTag = "factory" TraceTagMining = "mining" )
View Source
const TraceTagChooseExtendEndorsePair = "ChooseExtendEndorsePair"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment interface { attacher.Environment backlog.Environment ControllerPrivateKey() ed25519.PrivateKey SequencerName() string Backlog() *backlog.InputBacklog MaxTagAlongOutputs() int MilestonesTTLSlots() int }
type MilestoneFactory ¶
type MilestoneFactory struct { Environment // contains filtered or unexported fields }
func New ¶
func New(env Environment) (*MilestoneFactory, error)
func (*MilestoneFactory) AddOwnMilestone ¶
func (mf *MilestoneFactory) AddOwnMilestone(vid *vertex.WrappedTx)
func (*MilestoneFactory) AttachTagAlongInputs ¶
func (mf *MilestoneFactory) AttachTagAlongInputs(a *attacher.IncrementalAttacher) (numInserted int)
func (*MilestoneFactory) BestCoverageInTheSlot ¶
func (mf *MilestoneFactory) BestCoverageInTheSlot(targetTs ledger.Time) uint64
func (*MilestoneFactory) ChooseExtendEndorsePair ¶
func (mf *MilestoneFactory) ChooseExtendEndorsePair(proposerName string, targetTs ledger.Time) *attacher.IncrementalAttacher
ChooseExtendEndorsePair implements one of possible strategies: finds a pair: milestone to extend and another sequencer transaction to endorse, as heavy as possible
func (*MilestoneFactory) CurrentTargetTs ¶
func (mf *MilestoneFactory) CurrentTargetTs() ledger.Time
func (*MilestoneFactory) NumMilestones ¶
func (mf *MilestoneFactory) NumMilestones() int
func (*MilestoneFactory) NumOutputsInBuffer ¶
func (mf *MilestoneFactory) NumOutputsInBuffer() int
func (*MilestoneFactory) OwnLatestMilestoneOutput ¶
func (mf *MilestoneFactory) OwnLatestMilestoneOutput() vertex.WrappedOutput
func (*MilestoneFactory) Propose ¶
func (mf *MilestoneFactory) Propose(a *attacher.IncrementalAttacher, strategyName string) error
func (*MilestoneFactory) StartProposingForTargetLogicalTime ¶
func (mf *MilestoneFactory) StartProposingForTargetLogicalTime(targetTs ledger.Time) (*transaction.Transaction, *txmetadata.TransactionMetadata)
Click to show internal directories.
Click to hide internal directories.