Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxQuestions is the maximum number of questions allowed in a VotePackage MaxQuestions = 64 // MaxOptions is the maximum number of options allowed in a VotePackage question MaxOptions = 768 )
Variables ¶
This section is empty.
Functions ¶
func NewEmptyVotes ¶
NewEmptyVotes creates a new results struct with the given number of questions and options
Types ¶
type Results ¶
type Results struct { ProcessID types.HexBytes `json:"processId"` Votes [][]*types.BigInt `json:"votes"` Weight *types.BigInt `json:"weight"` EnvelopeHeight uint64 `json:"envelopeHeight"` EnvelopeType *models.EnvelopeType `json:"envelopeType"` VoteOpts *models.ProcessVoteOptions `json:"voteOptions"` Signatures []types.HexBytes `json:"signatures"` Final bool `json:"final"` BlockHeight uint32 `json:"blockHeight"` }
Results holds the final results and relevant process info for a vochain process
func (*Results) Add ¶
Add adds the total weight and votes from the given Results to the containing Results making the method call.
func (*Results) AddVote ¶
AddVote adds the voteValues and weight to the Results struct. Checks are performed according the Ballot Protocol.
Click to show internal directories.
Click to hide internal directories.