testvoteproof

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSignedVoteForOffChainTree

func BuildSignedVoteForOffChainTree(t *testing.T, electionID []byte, key *ethereum.SignKeys,
	proof []byte, votePackage []int, chainID string) *models.SignedTx

BuildSignedVoteForOffChainTree builds a signed vote for an off-chain merkle-tree election.

func CreateKeysAndBuildCensus

func CreateKeysAndBuildCensus(t *testing.T, size int) ([]*ethereum.SignKeys, []byte, [][]byte)

CreateKeysAndBuildCensus creates a bunch of random keys and a new census tree. It returns the keys, the census root and the proofs for each key.

func GetCSPproofBatch

func GetCSPproofBatch(signers []*ethereum.SignKeys,
	csp *ethereum.SignKeys, pid []byte) ([]types.HexBytes, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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