# Functions

CalcWeightedVotes calculates the weighted votes based on time.
NewBucket creates a new bucket.
NewCandidate creates a new candidate with scores as 0s.
NewElectionResultForTest creates an election result for test purpose only.
NewPoll creates a new electionresultMeta.
NewRegistration creates a new registration.
NewResultCalculator creates a result calculator.
NewVote creates a new vote.

# Variables

ErrInvalidProto indicates a format error of an election proto.

# Structs

Bucket defines a bucket stored in staking contract.
Candidate defines a delegate candidate.
ElectionResult defines the collection of voting result on a height.
Poll defines the struct stores election result in db.
Registration defines a registration in contract.
ResultCalculator defines a calculator for a set of votes.
Vote defines the structure of a vote.

# Type aliases

BucketFilterFunc defines the function to filter vote.
CandidateFilterFunc defines the function to filter candidate.