Documentation ¶
Overview ¶
*
- @file
- @copyright defined in aergo/LICENSE.txt
*
- @file
- @copyright defined in aergo/LICENSE.txt
Index ¶
- Constants
- func BuildOrderedCandidates(vote map[string]*big.Int) []string
- func ExecuteSystemTx(scs *state.ContractState, txBody *types.TxBody, sender *state.V, ...) error
- func GetRankers(ar AccountStateReader, n int) ([]string, error)
- func GetStaking(scs *state.ContractState, address []byte) (*types.Staking, error)
- func GetVote(scs *state.ContractState, voter []byte) (*types.Vote, error)
- func GetVoteResult(ar AccountStateReader, n int) (*types.VoteList, error)
- func InitVoteResult(scs *state.ContractState, voteResult map[string]*big.Int) error
- func ValidateSystemTx(account []byte, txBody *types.TxBody, scs *state.ContractState, blockNo uint64) error
- type AccountStateReader
Constants ¶
View Source
const FutureBlockNo = math.MaxUint64
View Source
const PeerIDLength = 39
View Source
const StakingDelay = 60 * 60 * 24 //block interval
View Source
const VotingDelay = 60 * 60 * 24 //block interval
Variables ¶
This section is empty.
Functions ¶
func BuildOrderedCandidates ¶ added in v0.8.3
BuildOrderedCandidates returns a candidate list ordered by votes.xs
func ExecuteSystemTx ¶
func GetRankers ¶ added in v0.11.0
func GetRankers(ar AccountStateReader, n int) ([]string, error)
GetRankers returns the IDs of the top n rankers.
func GetStaking ¶ added in v0.8.1
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 ValidateSystemTx ¶
Types ¶
type AccountStateReader ¶ added in v0.9.4
type AccountStateReader interface {
GetSystemAccountState() (*state.ContractState, error)
}
AccountStateReader is an interface for getting a system account state.
Click to show internal directories.
Click to hide internal directories.