Module pallet_curveless_staking::offchain_election[][src]

Helpers for offchain worker election.

Enums

OffchainElectionError

Error types related to the offchain election machinery.

Functions

get_balancing_iters

Get a random number of iterations to run the balancing.

maximum_compact_len

Find the maximum len that a compact can have in order to fit into the block weight.

prepare_submission

Takes an election result and spits out some data that can be submitted to the chain.

trim_to_weight

Greedily reduce the size of the a solution to fit into the block, w.r.t. weight.