v0.9.0 Latest Latest

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Evidence

type Evidence interface {
	Route() string
	Type() string
	String() string
	Hash() tmbytes.HexBytes
	ValidateBasic() sdk.Error

	// Height at which the infraction occurred
	GetHeight() int64

Evidence defines the contract which concrete evidence types of misbehavior must implement.

type MsgSubmitEvidence

type MsgSubmitEvidence interface {

	GetEvidence() Evidence
	GetSubmitter() sdk.CUAddress

MsgSubmitEvidence defines the specific interface a concrete message must implement in order to process submitted evidence. The concrete MsgSubmitEvidence must be defined at the application-level.

type NewVoteBox

type NewVoteBox func(int) VoteBox

NewVoteBox creates a new instance of VoteBox with confirm threshold.

type ValidatorEvidence

type ValidatorEvidence interface {

	// The consensus address of the malicious validator at time of infraction
	GetConsensusAddress() sdk.ConsAddress

	// The total power of the malicious validator at time of infraction
	GetValidatorPower() int64

	// The total validator set power at time of infraction
	GetTotalPower() int64

ValidatorEvidence extends Evidence interface to define contract for evidence against malicious validators

type Vote

type Vote interface{}

type VoteBox

type VoteBox interface {
	// AddVote adds a vote and returns whether it's confirmed for the first time.
	AddVote(sdk.CUAddress, Vote) bool
	// ValidVotes returns the VoteItem list which confirms this vote.
	ValidVotes() []*VoteItem
	HasConfirmed() bool

type VoteItem

type VoteItem struct {
	Vote  Vote
	Voter sdk.CUAddress

Jump to

Keyboard shortcuts

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