storageincentives

package
v1.10.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: BSD-3-Clause Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultBlocksPerRound = 152
	DefaultBlocksPerPhase = DefaultBlocksPerRound / 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(
	overlay swarm.Address,
	backend ChainBackend,
	logger log.Logger,
	monitor Monitor,
	contract redistribution.Contract,
	reserve postage.Storer,
	sampler storage.Sampler,
	blockTime time.Duration, blocksPerRound, blocksPerPhase uint64) *Agent

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) Metrics

func (s *Agent) Metrics() []prometheus.Collector

TODO: register metric

type ChainBackend

type ChainBackend interface {
	BlockNumber(context.Context) (uint64, error)
	HeaderByNumber(context.Context, *big.Int) (*types.Header, error)
}

type Monitor

type Monitor interface {
	IsFullySynced() bool
}

type PhaseType

type PhaseType int

func (PhaseType) String

func (p PhaseType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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