vote

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VoteSizeLimit is the maximum size of vote allowed
	VoteSizeLimit = 278
	// CandidatesPrefix is the prefix of the key of candidateList
	CandidatesPrefix = "Candidates."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	// contains filtered or unexported fields
}

Protocol defines the protocol of handling votes

func NewProtocol

func NewProtocol(bc blockchain.Blockchain) *Protocol

NewProtocol instantiates the protocol of vote

func (*Protocol) Handle

Handle handles a vote

func (*Protocol) Validate

func (p *Protocol) Validate(_ context.Context, act action.Action) error

Validate validates a vote

Jump to

Keyboard shortcuts

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