snow

package
v1.0.4-hotfix Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: BSD-3-Clause Imports: 9 Imported by: 289

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasLookup

type AliasLookup interface {
	Lookup(alias string) (ids.ID, error)
	PrimaryAlias(id ids.ID) (string, error)
}

AliasLookup ...

type Callable

type Callable interface {
	Call(writer http.ResponseWriter, method, base, endpoint string, body io.Reader, headers map[string]string) error
}

Callable ...

type Context

type Context struct {
	NetworkID uint32
	SubnetID  ids.ID
	ChainID   ids.ID
	NodeID    ids.ShortID

	XChainID    ids.ID
	AVAXAssetID ids.ID

	Log                 logging.Logger
	DecisionDispatcher  EventDispatcher
	ConsensusDispatcher EventDispatcher
	Lock                sync.RWMutex
	Keystore            Keystore
	SharedMemory        atomic.SharedMemory
	BCLookup            AliasLookup
	SNLookup            SubnetLookup

	Namespace string
	Metrics   prometheus.Registerer
	// contains filtered or unexported fields
}

Context is information about the current execution. [NetworkID] is the ID of the network this context exists within. [ChainID] is the ID of the chain this context exists within. [NodeID] is the ID of this node

func DefaultContextTest

func DefaultContextTest() *Context

DefaultContextTest ...

func (*Context) Bootstrapped added in v0.8.0

func (ctx *Context) Bootstrapped()

Bootstrapped marks this chain as done bootstrapping

func (*Context) IsBootstrapped added in v0.8.0

func (ctx *Context) IsBootstrapped() bool

IsBootstrapped returns true iff this chain is done bootstrapping

type EventDispatcher added in v1.0.1

type EventDispatcher interface {
	Issue(ctx *Context, containerID ids.ID, container []byte)
	Accept(ctx *Context, containerID ids.ID, container []byte)
	Reject(ctx *Context, containerID ids.ID, container []byte)
}

EventDispatcher ...

type Keystore

type Keystore interface {
	GetDatabase(username, password string) (database.Database, error)
}

Keystore ...

type SubnetLookup added in v0.8.0

type SubnetLookup interface {
	SubnetID(chainID ids.ID) (ids.ID, error)
}

SubnetLookup ...

Directories

Path Synopsis
consensus
engine
avalanche/state
Package state manages the meta-data required by consensus for an avalanche dag.
Package state manages the meta-data required by consensus for an avalanche dag.
networking

Jump to

Keyboard shortcuts

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