ballots

package
v0.2.16-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db sql.Executor, ballot *types.Ballot) error

Add ballot to the database.

func CountByPubkeyLayer

func CountByPubkeyLayer(db sql.Executor, lid types.LayerID, pubkey []byte) (int, error)

CountByPubkeyLayer counts number of ballots in the layer for the pubkey.

func Get

func Get(db sql.Executor, id types.BallotID) (rst *types.Ballot, err error)

Get ballot with id from database.

func GetRefBallot

func GetRefBallot(db sql.Executor, epochID types.EpochID, pubkey []byte) (ballotID types.BallotID, err error)

GetRefBallot gets a ref ballot for a layer and a pubkey.

func Has

func Has(db sql.Executor, id types.BallotID) (bool, error)

Has a ballot in the database.

func IDsInLayer

func IDsInLayer(db sql.Executor, lid types.LayerID) (rst []types.BallotID, err error)

IDsInLayer returns ballots ids in the layer.

func Layer

func Layer(db sql.Executor, lid types.LayerID) (rst []*types.Ballot, err error)

Layer returns full body ballot for layer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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