db

package
v0.0.0-...-65a1244 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCodec

func MakeCodec() *amino.Codec

func SetupMultiStore

func SetupMultiStore() (sdk.MultiStore, *sdk.KVStoreKey, *sdk.KVStoreKey, *sdk.KVStoreKey)

Types

type BallotKeeper

type BallotKeeper struct {
	ListingKey sdk.StoreKey

	BallotKey sdk.StoreKey

	Cdc *amino.Codec
}

func NewBallotKeeper

func NewBallotKeeper(listingKey sdk.StoreKey, ballotkey sdk.StoreKey, _cdc *amino.Codec) BallotKeeper

func (BallotKeeper) ActivateBallot

func (bk BallotKeeper) ActivateBallot(ctx sdk.Context, accountKeeper bank.Keeper, owner sdk.Address, challenger sdk.Address,
	identifier string, commitLen int64, revealLen, minBond int64, challengeBond int64) sdk.Error

func (BallotKeeper) AddBallot

func (bk BallotKeeper) AddBallot(ctx sdk.Context, identifier string, owner sdk.Address, applyLen int64, bond int64) sdk.Error

func (BallotKeeper) AddListing

func (bk BallotKeeper) AddListing(ctx sdk.Context, identifier string, votes int64)

func (BallotKeeper) CommitBallot

func (bk BallotKeeper) CommitBallot(ctx sdk.Context, owner sdk.Address, identifier string, commitment []byte)

func (BallotKeeper) DeactivateBallot

func (bk BallotKeeper) DeactivateBallot(ctx sdk.Context, identifier string)

func (BallotKeeper) DeleteBallot

func (bk BallotKeeper) DeleteBallot(ctx sdk.Context, identifier string)

func (BallotKeeper) DeleteCommitment

func (bk BallotKeeper) DeleteCommitment(ctx sdk.Context, owner sdk.Address, identifier string)

func (BallotKeeper) DeleteListing

func (bk BallotKeeper) DeleteListing(ctx sdk.Context, identifier string)

func (BallotKeeper) DeleteVote

func (bk BallotKeeper) DeleteVote(ctx sdk.Context, owner sdk.Address, identifier string)

func (BallotKeeper) GetBallot

func (bk BallotKeeper) GetBallot(ctx sdk.Context, identifier string) tcr.Ballot

Will get Ballot using unique identifier. Do not need to specify status

func (BallotKeeper) GetCommitment

func (bk BallotKeeper) GetCommitment(ctx sdk.Context, owner sdk.Address, identifier string) []byte

func (BallotKeeper) GetListing

func (bk BallotKeeper) GetListing(ctx sdk.Context, identifier string) tcr.Listing

func (BallotKeeper) GetVote

func (bk BallotKeeper) GetVote(ctx sdk.Context, owner sdk.Address, identifier string) tcr.Vote

func (BallotKeeper) ProposalQueueContains

func (bk BallotKeeper) ProposalQueueContains(ctx sdk.Context, identifier string) bool

func (BallotKeeper) ProposalQueueGetPriority

func (bk BallotKeeper) ProposalQueueGetPriority(ctx sdk.Context, identifier string) int

func (BallotKeeper) ProposalQueueHead

func (bk BallotKeeper) ProposalQueueHead(ctx sdk.Context) tcr.Ballot

ProposalQueueHead returns the head of the PriorityQueue

func (BallotKeeper) ProposalQueuePop

func (bk BallotKeeper) ProposalQueuePop(ctx sdk.Context) tcr.Ballot

ProposalQueuePop pops the head from the Proposal queue

func (BallotKeeper) ProposalQueuePush

func (bk BallotKeeper) ProposalQueuePush(ctx sdk.Context, identifier string, blockNum int64)

ProposalQueuePush pushes a candidate to Priority Queue

func (BallotKeeper) ProposalQueueUpdate

func (bk BallotKeeper) ProposalQueueUpdate(ctx sdk.Context, identifier string, newBlockNum int64) sdk.Error

ProposalQueueUpdate updates a candidate with new priority

func (BallotKeeper) VoteBallot

func (bk BallotKeeper) VoteBallot(ctx sdk.Context, owner sdk.Address, identifier string, vote bool, power int64) sdk.Error

Jump to

Keyboard shortcuts

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