Documentation
¶
Index ¶
- func NewPrivValidatorMemory(addressable acm.Addressable, signer crypto.Signer) *privValidatorMemory
- type LastSignedInfo
- func (lsi *LastSignedInfo) SignHeartbeat(sign goCryptoSigner, chainID string, heartbeat *types.Heartbeat) error
- func (lsi *LastSignedInfo) SignProposal(sign goCryptoSigner, chainID string, proposal *types.Proposal) error
- func (lsi *LastSignedInfo) SignVote(sign goCryptoSigner, chainID string, vote *types.Vote) error
- func (lsi *LastSignedInfo) String() string
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.