proposer_generic

package
v0.0.0-...-aa082da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceTag = "propose-generic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	attacher.Environment
	ControllerPrivateKey() ed25519.PrivateKey
	CurrentTargetTs() ledger.Time
	OwnLatestMilestoneOutput() vertex.WrappedOutput
	AttachTagAlongInputs(a *attacher.IncrementalAttacher) int
	ChooseExtendEndorsePair(proposerName string, targetTs ledger.Time) *attacher.IncrementalAttacher
	BestCoverageInTheSlot(targetTs ledger.Time) uint64
	SequencerName() string
	Propose(a *attacher.IncrementalAttacher, strategyName string) error
	Backlog() *backlog.InputBacklog
}

type Strategy

type Strategy struct {
	Name        string
	ShortName   string
	Constructor TaskConstructor
}

type Task

type Task interface {
	Run()
	GetName() string
}

func New

func New(env Environment, strategy *Strategy, targetTs ledger.Time, ctx context.Context) Task

type TaskConstructor

type TaskConstructor func(generic *TaskGeneric) Task

type TaskGeneric

type TaskGeneric struct {
	Environment
	Name string

	Strategy *Strategy
	TargetTs ledger.Time
	// contains filtered or unexported fields
}

func (*TaskGeneric) GetName

func (t *TaskGeneric) GetName() string

func (*TaskGeneric) Run

func (t *TaskGeneric) Run()

func (*TaskGeneric) WithProposalGenerator

func (t *TaskGeneric) WithProposalGenerator(fun func() (*attacher.IncrementalAttacher, bool))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL