Documentation ¶
Index ¶
- Constants
- func AddNodePriv(address, chainID string, pv *privval.FilePV, old *otp.PrivValidatorFS)
- func SortNodePriv()
- type NodePriv
- func (np *NodePriv) SaveOldSigned(height int64, round int, step int8, signBytes []byte, sig gco.Signature)
- func (np *NodePriv) SaveSigned(height int64, round int, step int8, signBytes []byte, sig []byte)
- func (np *NodePriv) SignProposal(chainID string, proposal *types.Proposal)
- func (np *NodePriv) SignVote(chainID string, vote *types.Vote)
- func (np *NodePriv) VoteToStep(voteType byte) int8
- type NodePrivByAddress
- type NodePrivList
Constants ¶
View Source
const ( StepNone int8 = 0 // Used to distinguish the initial state StepPropose int8 = 1 StepPrevote int8 = 2 StepPrecommit int8 = 3 )
Variables ¶
This section is empty.
Functions ¶
func AddNodePriv ¶
func AddNodePriv(address, chainID string, pv *privval.FilePV, old *otp.PrivValidatorFS)
func SortNodePriv ¶
func SortNodePriv()
Types ¶
type NodePriv ¶
type NodePriv struct { Index int ChainID string Address cmn.HexBytes /*pv address*/ PrivVal *privval.FilePV OldPrivVal *otp.PrivValidatorFS }
func GetNodePrivByAddress ¶
func GetNodePrivByPeer ¶
func (*NodePriv) SaveOldSigned ¶
func (*NodePriv) SaveSigned ¶
func (*NodePriv) SignProposal ¶
func (*NodePriv) VoteToStep ¶
type NodePrivByAddress ¶
type NodePrivByAddress []*NodePriv
Sort validators by address
func (NodePrivByAddress) Len ¶
func (ns NodePrivByAddress) Len() int
func (NodePrivByAddress) Less ¶
func (ns NodePrivByAddress) Less(i, j int) bool
func (NodePrivByAddress) Swap ¶
func (ns NodePrivByAddress) Swap(i, j int)
type NodePrivList ¶
Click to show internal directories.
Click to hide internal directories.