sortition

package
v0.0.0-...-d1caf50 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashRatio

func HashRatio(vrfOutput []byte) float64

HashRatio calculates a float number between [0, 1] with a random hash value which generated by vrf

func Sortition

func Sortition(ratio float64) bool

Sortition returns true/false decide by threshold which is const value

Types

This section is empty.

Jump to

Keyboard shortcuts

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