Documentation ¶
Index ¶
- Variables
- type DataHandler
- func (h *DataHandler) FetchEventsForVerification(currentHeight uint64) ([]*model.Event, error)
- func (h *DataHandler) FetchVotesForAggregation(eventHash string) ([]*model.Vote, error)
- func (h *DataHandler) IsEventExistsBetween(objectId string, spOperatorAddr string, fromChallengeId uint64, ...) (bool, error)
- func (h *DataHandler) UpdateEventStatus(challengeId uint64, status model.EventStatus) error
- func (h *DataHandler) UpdateEventStatusVerifyResult(challengeId uint64, status model.EventStatus, verifyResult model.VerifyResult) error
- type DataProvider
- type Verifier
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 (*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()
Click to show internal directories.
Click to hide internal directories.