@ethereumjs/blockchain / EthashConsensus
Defined in: consensus/ethash.ts:19
This class encapsulates Ethash-related consensus functionality when used with the Blockchain class.
new EthashConsensus(
ethash):EthashConsensus
Defined in: consensus/ethash.ts:27
MinimalEthashInterface
EthashConsensus
_ethash:
MinimalEthashInterface
Defined in: consensus/ethash.ts:22
algorithm:
ConsensusAlgorithm
Defined in: consensus/ethash.ts:21
blockchain:
Blockchain|undefined
Defined in: consensus/ethash.ts:20
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 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.
header of block to be checked
Promise<void>