votesync

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PollProtocolID is ID of poll protocol
	PollProtocolID = "poll"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GravityChainAPIs          []string      `yaml:"gravityChainAPIs"`
	GravityChainTimeInterval  time.Duration `yaml:"gravityChainTimeInterval"`
	OperatorPrivateKey        string        `yaml:"operatorPrivateKey"`
	IoTeXAPI                  string        `yaml:"ioTeXAPI"`
	IoTeXAPISecure            bool          `yaml:"ioTeXAPISecure"`
	RegisterContractAddress   string        `yaml:"registerContractAddress"`
	StakingContractAddress    string        `yaml:"stakingContractAddress"`
	PaginationSize            uint8         `yaml:"paginationSize"`
	BrokerPaginationSize      uint8         `yaml:"brokerPaginationSize"`
	VitaContractAddress       string        `yaml:"vitaContractAddress"`
	DiscordBotToken           string        `yaml:"discordBotToken"`
	DiscordChannelID          string        `yaml:"discordChannelID"`
	DiscordMsg                string        `yaml:"discordMsg"`
	DiscordReminder           string        `yaml:"discordReminder"`
	DardaenllesHeight         uint64        `yaml:"dardanellesHeight"`
	FairBankHeight            uint64        `yaml:"fairbankHeight"`
	NativeCommitteeInitHeight uint64        `yaml:"nativeCommitteeInitHeight"`
}

Config defines the configs for VoteSync

type VoteSync

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

VoteSync defines fields used in VoteSync

func NewVoteSync

func NewVoteSync(cfg Config) (*VoteSync, error)

NewVoteSync instantiates new VoteSync

func (*VoteSync) Start

func (vc *VoteSync) Start(ctx context.Context)

Start starts voteSync

func (*VoteSync) Stop

func (vc *VoteSync) Stop(ctx context.Context)

Stop stops voteSync

type WeightedVote

type WeightedVote struct {
	Voter string
	Votes *big.Int
}

WeightedVote defines voter and votes for weighted vote

Jump to

Keyboard shortcuts

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