vote

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	AccountManager() *accounts.Manager
	BlockChain() *core.BlockChain
	TxPool() *core.TxPool
	ChainID() *big.Int
}

Backend wraps all methods required for voting.

type Voter

type Voter struct {
	// contains filtered or unexported fields
}

The struct of voter

func NewVoter

func NewVoter(eth Backend, coinbase common.Address) *Voter

NewVoter creates a new voter

func (*Voter) SetVotebase

func (self *Voter) SetVotebase(addr common.Address)

Set the address for voting

func (*Voter) Start

func (self *Voter) Start(coinbase common.Address)

Start voting

func (*Voter) Stop

func (self *Voter) Stop()

Stop voting

func (*Voter) VoteLoop

func (self *Voter) VoteLoop()

Voting loop

func (*Voter) Votebase

func (self *Voter) Votebase() common.Address

get the votebase

func (*Voter) Voting

func (self *Voter) Voting() bool

Check the voting state

Jump to

Keyboard shortcuts

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