Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrivValidatorMemory ¶
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.
Click to show internal directories.
Click to hide internal directories.