@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:
Blockchain|undefined
Defined in: consensus/ethash.ts:19
genesisInit():
Promise<void>
Defined in: consensus/ethash.ts:63
Initialize genesis for consensus mechanism
Promise<void>
newBlock():
Promise<void>
Defined in: consensus/ethash.ts:68
Update consensus on new block
Promise<void>
setup(
__namedParameters):Promise<void>
Defined in: consensus/ethash.ts:64
Set up consensus mechanism
Promise<void>
validateConsensus(
block):Promise<void>
Defined in: consensus/ethash.ts:34
Validate block consensus parameters
Block
block to be validated
Promise<void>
validateDifficulty(
header):Promise<void>
Defined in: consensus/ethash.ts:49
Checks that the block’s difficulty matches the canonical difficulty of the parent header.
BlockHeader
header of block to be checked
Promise<void>