-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block: rename constructor createBlock (#3549)
* Block: rename constructor to createBlock * blockchain: rename helper function * client: rename helper function in test * Block: remove unused util.ts * fix test --------- Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>
- Loading branch information
Showing
91 changed files
with
442 additions
and
536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { createBlockFromBlockData } from '@ethereumjs/block' | ||
import { createBlock } from '@ethereumjs/block' | ||
import { Chain, Common, Hardfork } from '@ethereumjs/common' | ||
|
||
const common = new Common({ chain: Chain.Goerli, hardfork: Hardfork.Chainstart }) | ||
|
||
console.log(common.consensusType()) // 'poa' | ||
console.log(common.consensusAlgorithm()) // 'clique' | ||
|
||
createBlockFromBlockData({ header: { extraData: new Uint8Array(97) } }, { common }) | ||
createBlock({ header: { extraData: new Uint8Array(97) } }, { common }) | ||
console.log(`Old Clique Proof-of-Authority block created`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { createBlockFromBlockData } from '@ethereumjs/block' | ||
import { createBlock } from '@ethereumjs/block' | ||
import { Chain, Common, Hardfork } from '@ethereumjs/common' | ||
|
||
const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Chainstart }) | ||
|
||
console.log(common.consensusType()) // 'pow' | ||
console.log(common.consensusAlgorithm()) // 'ethash' | ||
|
||
createBlockFromBlockData({}, { common }) | ||
createBlock({}, { common }) | ||
console.log(`Old Proof-of-Work block created`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.