storageincentives

package
v1.10.0-rc13 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: BSD-3-Clause Imports: 19 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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,
	batchExpirer postagecontract.PostageBatchExpirer,
	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