@ethereumjs/blockchain / EthashConsensus
Defined in: consensus/ethash.ts:18
This class encapsulates Ethash-related consensus functionality when used with the Blockchain class.
new EthashConsensus(
ethash
):EthashConsensus
Defined in: consensus/ethash.ts:26
MinimalEthashInterface
EthashConsensus
_ethash:
MinimalEthashInterface
Defined in: consensus/ethash.ts:21
algorithm:
ConsensusAlgorithm
Defined in: consensus/ethash.ts:20
blockchain:
undefined
|Blockchain
Defined in: consensus/ethash.ts:19
genesisInit():
Promise
<void
>
Defined in: consensus/ethash.ts:64
Initialize genesis for consensus mechanism
Promise
<void
>
newBlock():
Promise
<void
>
Defined in: consensus/ethash.ts:69
Update consensus on new block
Promise
<void
>
setup(
__namedParameters
):Promise
<void
>
Defined in: consensus/ethash.ts:65
Set up consensus mechanism
Promise
<void
>
validateConsensus(
block
):Promise
<void
>
Defined in: consensus/ethash.ts:35
Validate block consensus parameters
Block
block to be validated
Promise
<void
>
validateDifficulty(
header
):Promise
<void
>
Defined in: consensus/ethash.ts:50
Checks that the block’s difficulty
matches the canonical difficulty of the parent header.
BlockHeader
header of block to be checked
Promise
<void
>