submitter

package
v0.0.2-hf.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheSize            = 300
	TimeFormat           = "15:04:05.00"
	TxSubmitLoopInterval = 5 * time.Second        // query last attested challenge id
	TxSubmitInterval     = 100 * time.Millisecond // query last attested challenge id
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataHandler

type DataHandler struct {
	// contains filtered or unexported fields
}

func NewDataHandler

func NewDataHandler(daoManager *dao.DaoManager, executor *executor.Executor) *DataHandler

func (*DataHandler) FetchEventsForSubmit

func (h *DataHandler) FetchEventsForSubmit(currentHeight uint64) ([]*model.Event, error)

func (*DataHandler) FetchVotesForAggregation

func (h *DataHandler) FetchVotesForAggregation(eventHash string) ([]*model.Vote, error)

func (*DataHandler) UpdateEventStatus

func (h *DataHandler) UpdateEventStatus(challengeId uint64, status model.EventStatus) error

type DataProvider

type DataProvider interface {
	FetchEventsForSubmit(currentHeight uint64) ([]*model.Event, error)
	FetchVotesForAggregation(eventHash string) ([]*model.Vote, error)
	UpdateEventStatus(challengeId uint64, status model.EventStatus) error
}

type TxSubmitter

type TxSubmitter struct {
	DataProvider
	// contains filtered or unexported fields
}

func NewTxSubmitter

func NewTxSubmitter(cfg *config.Config, executor *executor.Executor, submitterDataProvider DataProvider) *TxSubmitter

func (*TxSubmitter) SubmitTransactionLoop

func (s *TxSubmitter) SubmitTransactionLoop()

SubmitTransactionLoop polls for submitter inturn and fetches events for submit.

Jump to

Keyboard shortcuts

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