randomx

package
v0.0.0-...-a039820 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeedHashEpochLag    = 64
	SeedHashEpochBlocks = 2048
)

Variables

This section is empty.

Functions

func ConsensusHash

func ConsensusHash(buf []byte) types.Hash

func SeedHeight

func SeedHeight(height uint64) uint64

func SeedHeights

func SeedHeights(height uint64) (seedHeight, nextHeight uint64)

Types

type Flag

type Flag int
const (
	FlagLargePages Flag = 1 << iota
	FlagFullMemory
	FlagSecure
)

type Hasher

type Hasher interface {
	Hash(key []byte, input []byte) (types.Hash, error)
	OptionFlags(flags ...Flag) error
	OptionNumberOfCachedStates(n int) error
	Close()
}

func NewRandomX

func NewRandomX(n int, flags ...Flag) (Hasher, error)

Jump to

Keyboard shortcuts

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