system

package
v0.9.0-pretest Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 12 Imported by: 13

Documentation

Overview

*

  • @file
  • @copyright defined in aergo/LICENSE.txt

*

  • @file
  • @copyright defined in aergo/LICENSE.txt

Index

Constants

View Source
const FutureBlockNo = math.MaxUint64
View Source
const PeerIDLength = 39
View Source
const StakingDelay = 10
View Source
const VotingDelay = 5

Variables

This section is empty.

Functions

func BuildOrderedCandidates added in v0.8.3

func BuildOrderedCandidates(vote map[string]*big.Int) []string

BuildOrderedCandidates returns a candidate list ordered by votes.xs

func ExecuteSystemTx

func ExecuteSystemTx(scs *state.ContractState, txBody *types.TxBody, sender *state.V,
	blockNo types.BlockNo) error

func GetStaking added in v0.8.1

func GetStaking(scs *state.ContractState, address []byte) (*types.Staking, error)

func GetVote

func GetVote(scs *state.ContractState, voter []byte) (*types.Vote, error)

GetVote return amount, to, err

func GetVoteResult

func GetVoteResult(ar AccountStateReader, n int) (*types.VoteList, error)

GetVoteResult returns the top n voting result from the system account state.

func InitVoteResult

func InitVoteResult(scs *state.ContractState, voteResult map[string]*big.Int) error

func ValidateSystemTx

func ValidateSystemTx(account []byte, txBody *types.TxBody, scs *state.ContractState, blockNo uint64) error

Types

type AccountStateReader added in v0.9.0

type AccountStateReader interface {
	GetSystemAccountState() (*state.ContractState, error)
}

AccountStateReader is an interface for getting a system account state.

Jump to

Keyboard shortcuts

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