doublesha256

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2019 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoubleSHA256

type DoubleSHA256 struct {
	*consensus.CommonEngine
}

DoubleSHA256 is a consensus engine implementing PoW with double-sha256 algo. See the interface definition: Implements consensus.Pow

func New

func New(diffCalculator consensus.DifficultyCalculator, remote bool) *DoubleSHA256

New returns a DoubleSHA256 scheme.

func (*DoubleSHA256) Finalize

func (d *DoubleSHA256) Finalize(chain consensus.ChainReader, header types.IHeader, state *state.StateDB, txs []*types.Transaction, receipts []*types.Receipt) (types.IBlock, error)

func (*DoubleSHA256) Prepare

func (d *DoubleSHA256) Prepare(chain consensus.ChainReader, header types.IHeader) error

Prepare initializes the consensus fields of a block header according to the rules of a particular engine. The changes are executed inline.

Jump to

Keyboard shortcuts

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