Documentation ¶
Index ¶
- func CloseReputerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) error
- func CloseWorkerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) error
- func FilterUnacceptedWorkersFromReputerValueBundle(k *keeper.Keeper, ctx context.Context, topicId uint64, ...) (*types.ReputerValueBundle, error)
- func FindTopNByScoreDesc(ctx sdk.Context, n uint64, scores []emissionstypes.Score, randSeed int64) (topNActorsSorted []emissionstypes.Score, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseReputerNonce ¶
func CloseReputerNonce( k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) error
Closes an open reputer nonce.
func CloseWorkerNonce ¶
func CloseWorkerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) error
Closes an open worker nonce.
func FilterUnacceptedWorkersFromReputerValueBundle ¶ added in v0.3.1
func FilterUnacceptedWorkersFromReputerValueBundle( k *keeper.Keeper, ctx context.Context, topicId uint64, reputerRequestNonce types.ReputerRequestNonce, reputerValueBundle *types.ReputerValueBundle, ) (*types.ReputerValueBundle, error)
Filter out values of unaccepted workers. It is assumed that the work of inferers and forecasters stored at the nonce is already filtered for acceptance. This also removes duplicate values of the same worker.
func FindTopNByScoreDesc ¶
func FindTopNByScoreDesc( ctx sdk.Context, n uint64, scores []emissionstypes.Score, randSeed int64, ) (topNActorsSorted []emissionstypes.Score, allActorsSorted []emissionstypes.Score, actorIsTop map[string]struct{})
Sorts the given actors by score, desc, breaking ties randomly Returns the top N actors as a map with the actor as the key and a boolean (True) as the value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.