consensus

package
v0.0.0-...-5d652c1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProofOfWork

type ProofOfWork struct {
	// contains filtered or unexported fields
}

ProofOfWork represents a proof-of-work

func NewProofOfWork

func NewProofOfWork(b *blockchain.Block) *ProofOfWork

NewProofOfWork initializes a new ProofOfWork

func (*ProofOfWork) Run

func (pow *ProofOfWork) Run() (int, []byte)

Run performs the proof-of-work algorithm

func (*ProofOfWork) Validate

func (pow *ProofOfWork) Validate() bool

Validate validates block's PoW

Jump to

Keyboard shortcuts

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