chain

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: LGPL-2.1 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetworkInfo = &networkInfo

Functions

func DefaultProvider added in v1.2.0

func DefaultProvider(cfg *configs.MainConfiguration) api.IChainAPI

func Provider added in v1.2.0

func Provider(chainId configs.ChainId) api.IChainAPI

func RegisterProvider added in v1.2.0

func RegisterProvider(chainId configs.ChainId, api api.IChainAPI)

Types

type NetworkParams added in v1.2.0

type NetworkParams struct {
	StartTime                   *big.Int
	StartBlock                  *big.Int
	CurrentCycle                *big.Int
	CurrentBlock                *big.Int
	ActiveValidatorLicenseCount uint64
	ActiveSentryLicenseCount    uint64
	Validators                  map[string]string
	Sentries                    map[string]uint64
	Config                      *configs.MainConfiguration
	Synced                      bool
}

func (*NetworkParams) IsSentry added in v1.2.0

func (n *NetworkParams) IsSentry(pubKey string, cycle *big.Int) (bool, error)

func (*NetworkParams) IsValidator added in v1.2.0

func (n *NetworkParams) IsValidator(key string) (bool, error)

func (*NetworkParams) IsValidatorOwner added in v1.2.0

func (n *NetworkParams) IsValidatorOwner(address string) (bool, error)

func (*NetworkParams) Sync added in v1.2.0

func (n *NetworkParams) Sync(ctx *context.Context, syncFunc func() bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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