interfaces

package
v1.19.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package interfaces provides common consensus interfaces

Package interfaces provides common consensus interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BCLookup

type BCLookup interface {
	// Lookup returns the blockchain ID for an alias
	Lookup(alias string) (ids.ID, error)
	// GetAlias returns the alias for a blockchain ID
	GetAlias(blockchainID ids.ID) (string, error)
	// GetBlockchainID returns the blockchain ID for an alias
	GetBlockchainID(alias string) (ids.ID, error)
	// PrimaryAlias returns the primary alias for a blockchain
	PrimaryAlias(blockchainID ids.ID) (string, error)
	// Aliases returns all aliases for a blockchain
	Aliases(blockchainID ids.ID) ([]string, error)
}

BCLookup provides blockchain lookup functionality

type State

type State uint8

State represents consensus state

const (
	// StateSyncing indicates the node is syncing state
	StateSyncing State = iota
	// Bootstrapping indicates the node is bootstrapping
	Bootstrapping
	// NormalOp indicates normal operation
	NormalOp
)

type StateHolder

type StateHolder interface {
	// GetState returns the current state
	GetState() State
}

StateHolder holds state information

Jump to

Keyboard shortcuts

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