validator

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrivValidatorMemory

func NewPrivValidatorMemory(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

type LastSignedInfo struct {
	sync.Mutex
	Height    int64        `json:"height"`
	Round     int          `json:"round"`
	Step      int8         `json:"step"`
	Signature []byte       `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

func NewLastSignedInfo() *LastSignedInfo

func (*LastSignedInfo) SignProposal

func (lsi *LastSignedInfo) SignProposal(sign tmSigner, chainID string, proposal *tmTypes.Proposal) error

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

func (*LastSignedInfo) SignVote

func (lsi *LastSignedInfo) SignVote(sign tmSigner, chainID string, vote *tmTypes.Vote) error

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

func (*LastSignedInfo) String

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