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.
Click to show internal directories.
Click to hide internal directories.