pow

package
v0.11.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: ISC Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockLevel added in v0.11.0

func BlockLevel(header externalapi.BlockHeader) int

BlockLevel returns the block level of the given header.

func CalculateProofOfWorkValue added in v0.11.0

func CalculateProofOfWorkValue(header externalapi.MutableBlockHeader) *big.Int

CalculateProofOfWorkValue hashes the given header and returns its big.Int value

func CheckProofOfWorkByBits

func CheckProofOfWorkByBits(header externalapi.MutableBlockHeader) bool

CheckProofOfWorkByBits check's if the block has a valid PoW according to its Bits field it does not check if the difficulty itself is valid or less than the maximum for the appropriate network

func CheckProofOfWorkWithTarget

func CheckProofOfWorkWithTarget(header externalapi.MutableBlockHeader, target *big.Int) bool

CheckProofOfWorkWithTarget check's if the block has a valid PoW according to the provided target it does not check if the difficulty itself is valid or less than the maximum for the appropriate network

Types

This section is empty.

Jump to

Keyboard shortcuts

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