@ethereumjs/blockchain / CasperConsensus
Class: CasperConsensus
This class encapsulates Casper-related consensus functionality when used with the Blockchain class.
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new CasperConsensus()
Defined in
consensus/casper.ts:13
Properties
algorithm
• algorithm: ConsensusAlgorithm
Implementation of
Consensus.algorithm
Defined in
consensus/casper.ts:11
Methods
genesisInit
▸ genesisInit(): Promise<void>
Initialize genesis for consensus mechanism
Returns
Promise<void>
Implementation of
Consensus.genesisInit
Defined in
consensus/casper.ts:17
newBlock
▸ newBlock(): Promise<void>
Update consensus on new block
Returns
Promise<void>
Implementation of
Consensus.newBlock
Defined in
consensus/casper.ts:29
setup
▸ setup(): Promise<void>
Set up consensus mechanism
Returns
Promise<void>
Implementation of
Consensus.setup
Defined in
consensus/casper.ts:19
validateConsensus
▸ validateConsensus(): Promise<void>
Validate block consensus parameters
Returns
Promise<void>
Implementation of
Consensus.validateConsensus
Defined in
consensus/casper.ts:21
validateDifficulty
▸ validateDifficulty(header): Promise<void>
Parameters
| Name |
Type |
header |
BlockHeader |
Returns
Promise<void>
Implementation of
Consensus.validateDifficulty
Defined in
consensus/casper.ts:23