validator

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 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

This section is empty.

Variables

This section is empty.

Functions

func NewPrivValidatorMemory

func NewPrivValidatorMemory(addressable acm.Addressable, signer crypto.Signer) *privValidatorMemory

Create a PrivValidator with in-memory state that takes an addressable representing the validator identity and a signer providing private signing for that identity.

Types

type LastSignedInfo added in v0.19.0

type LastSignedInfo struct {
	sync.Mutex
	Height    int64            `json:"height"`
	Round     int              `json:"round"`
	Step      int8             `json:"step"`
	Signature crypto.Signature `json:"signature,omitempty"` // so we dont lose signatures
	SignBytes cmn.HexBytes     `json:"signbytes,omitempty"` // so we dont lose signatures
}

LastSignedInfo contains information about the latest data signed by a validator to help prevent double signing.

func NewLastSignedInfo added in v0.19.0

func NewLastSignedInfo() *LastSignedInfo

func (*LastSignedInfo) SignHeartbeat added in v0.19.0

func (lsi *LastSignedInfo) SignHeartbeat(sign goCryptoSigner, chainID string, heartbeat *types.Heartbeat) error

SignHeartbeat signs a canonical representation of the heartbeat, along with the chainID. Implements PrivValidator.

func (*LastSignedInfo) SignProposal added in v0.19.0

func (lsi *LastSignedInfo) SignProposal(sign goCryptoSigner, chainID string, proposal *types.Proposal) error

SignProposal signs a canonical representation of the proposal, along with the chainID. Implements PrivValidator.

func (*LastSignedInfo) SignVote added in v0.19.0

func (lsi *LastSignedInfo) SignVote(sign goCryptoSigner, chainID string, vote *types.Vote) error

SignVote signs a canonical representation of the vote, along with the chainID. Implements PrivValidator.

func (*LastSignedInfo) String added in v0.19.0

func (lsi *LastSignedInfo) String() string

String returns a string representation of the LastSignedInfo.

Jump to

Keyboard shortcuts

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