guardian

package
v0.0.0-...-ad9d088 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GuardianSet

type GuardianSet struct {
	GstByIndex            []common.GuardianSet
	ExpirationTimeByIndex []time.Time
}

GuardianSet definition.

func (GuardianSet) GetLatest

func (gs GuardianSet) GetLatest() common.GuardianSet

GetLatest get the lastest guardianset.

func (GuardianSet) IsValid

func (gs GuardianSet) IsValid(gsIx uint32, t time.Time) bool

IsValid check if a guardianSet is valid.

type Service

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

func NewService

func NewService(repo *repository.GuardianSetRepository, p2pNetwork string, cache cache.Cache,
	metrics metrics.Metrics, logger *zap.Logger) *Service

func (*Service) GetGuardianSet

func (s *Service) GetGuardianSet(ctx context.Context) (*GuardianSet, error)

Jump to

Keyboard shortcuts

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