Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownAncestor is returned when validating a block requires an ancestor // that is unknown. ErrUnknownAncestor = errors.New("unknown ancestor") // ErrPrunedAncestor is returned when validating a block requires an ancestor // that is known, but the state of which is not available. ErrPrunedAncestor = errors.New("pruned ancestor") // ErrFutureBlock is returned when a block's timestamp is in the future according // to the current node. ErrFutureBlock = errors.New("block in the future") // ErrInvalidNumber is returned if a block's number doesn't equal its parent's // plus one. ErrInvalidNumber = errors.New("invalid block number") )
Functions ¶
This section is empty.
Types ¶
type AliasManager ¶ added in v0.8.0
type AliasManager interface {
Alias(ids.ID, string) error
Aliases(ids.ID) ([]string, error)
PrimaryAlias(ids.ID) (string, error)
}
AliasManager interface
type Block ¶ added in v0.8.0
type Block interface {
ID() ids.ID
ParentID() ids.ID
Height() uint64
Verify() error
Accept() error
Reject() error
Status() Status
}
Block is the interface for linear blocks
type ChainHeaderReader ¶
type ChainHeaderReader = iface.ChainHeaderReader
Use interfaces from the iface package
type ChainReader ¶
type ChainReader = iface.ChainReader
type Context ¶ added in v0.8.0
type Context struct {
NetworkID uint32
SubnetID ids.ID
ChainID ids.ID
NodeID ids.NodeID
PublicKey *bls.PublicKey
XChainID ids.ID
CChainID ids.ID
LUXAssetID ids.ID
Log logging.Logger
Metrics metrics.MultiGatherer
ChainDataDir string
AliasManager AliasManager
Validators ValidatorManager
}
Context is the context for the chain
type PoS ¶ added in v0.8.0
type PoS interface {
Engine
}
PoS is a consensus engine based on proof-of-stake (delegated to Lux).
type PoW ¶ added in v0.8.0
type PoW interface {
Engine
// Hashrate returns the current mining hashrate of a PoW consensus engine.
Hashrate() float64
}
PoW is a consensus engine based on proof-of-work (deprecated).
Directories
¶
| Path | Synopsis |
|---|---|
|
misc
|
|
|
Package validators is a generated GoMock package.
|
Package validators is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.