msgserver

package
v0.1.0-dev.a53b6d4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTopNByScoreDesc added in v0.2.6

func FindTopNByScoreDesc(n uint64, scoresByActor map[Actor]Score, randSeed BlockHeight) map[Actor]bool

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

func NewMsgServerImpl

func NewMsgServerImpl(keeper keeper.Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the module MsgServer interface.

Types

type Actor added in v0.2.6

type Actor = string

type Allo

type Allo = cosmosMath.Int

type BlockHeight added in v0.2.6

type BlockHeight = int64

type PriorityQueue added in v0.2.6

type PriorityQueue []*SortableItem

func (PriorityQueue) Len added in v0.2.6

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less added in v0.2.6

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop added in v0.2.6

func (pq *PriorityQueue) Pop() any

func (*PriorityQueue) Push added in v0.2.6

func (pq *PriorityQueue) Push(x any)

func (PriorityQueue) Swap added in v0.2.6

func (pq PriorityQueue) Swap(i, j int)

type Score added in v0.2.6

type Score = types.Score

type SortableItem added in v0.2.6

type SortableItem struct {
	Value      Actor
	Weight     Score
	Tiebreaker uint32
	// contains filtered or unexported fields
}

A structure to hold the original value and a random tiebreaker

type TopicId

type TopicId = uint64

Jump to

Keyboard shortcuts

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