store

package
v0.0.0-...-a3b524e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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 GetNodePrivByAddress(address string) *NodePriv

func GetNodePrivByPeer

func GetNodePrivByPeer(p2pID string) *NodePriv

func (*NodePriv) SaveOldSigned

func (np *NodePriv) SaveOldSigned(height int64, round int, step int8, signBytes []byte, sig gco.Signature)

func (*NodePriv) SaveSigned

func (np *NodePriv) SaveSigned(height int64, round int, step int8, signBytes []byte, sig []byte)

func (*NodePriv) SignProposal

func (np *NodePriv) SignProposal(chainID string, proposal *types.Proposal)

func (*NodePriv) SignVote

func (np *NodePriv) SignVote(chainID string, vote *types.Vote)

func (*NodePriv) VoteToStep

func (np *NodePriv) VoteToStep(voteType byte) int8

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

type NodePrivList map[string]*NodePriv

Jump to

Keyboard shortcuts

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