verifier

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateDeduplicationInterval = 24 * time.Hour
View Source
var VerifyHashLoopInterval = 2 * time.Second

Functions

This section is empty.

Types

type DataHandler added in v0.0.2

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

func NewDataHandler added in v0.0.2

func NewDataHandler(daoManager *dao.DaoManager) *DataHandler

func (*DataHandler) FetchEventsForVerification added in v0.0.2

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

func (*DataHandler) FetchVotesForAggregation added in v0.0.2

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

func (*DataHandler) IsEventExistsBetween added in v0.0.2

func (h *DataHandler) IsEventExistsBetween(objectId string, spOperatorAddr string, fromChallengeId uint64, toChallengeId uint64) (bool, error)

func (*DataHandler) UpdateEventStatus added in v0.0.2

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

func (*DataHandler) UpdateEventStatusVerifyResult added in v0.0.2

func (h *DataHandler) UpdateEventStatusVerifyResult(challengeId uint64, status model.EventStatus, verifyResult model.VerifyResult) error

type DataProvider added in v0.0.2

type DataProvider interface {
	FetchEventsForVerification(currentHeight uint64) ([]*model.Event, error)
	UpdateEventStatusVerifyResult(challengeId uint64, status model.EventStatus, verifyResult model.VerifyResult) error
	UpdateEventStatus(challengeId uint64, status model.EventStatus) error
	IsEventExistsBetween(objectId string, spOperatorAddr string, fromChallengeId uint64, toChallengeId uint64) (bool, error)
}

type Verifier

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

func NewHashVerifier

func NewHashVerifier(cfg *config.Config, executor *executor.Executor, dataProvider DataProvider, metricService *metrics.MetricService,
) *Verifier

func (*Verifier) VerifyHashLoop

func (v *Verifier) VerifyHashLoop()

Jump to

Keyboard shortcuts

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