-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename blockFrom... to createBlockFrom...
- Loading branch information
Showing
111 changed files
with
563 additions
and
521 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 { Block, blockFromBlockData } from '@ethereumjs/block' | ||
import { Block, createBlockFromBlockData } 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' | ||
|
||
blockFromBlockData({ header: { extraData: new Uint8Array(97) } }, { common }) | ||
createBlockFromBlockData({ 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 { Block, blockFromBlockData } from '@ethereumjs/block' | ||
import { Block, createBlockFromBlockData } 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' | ||
|
||
blockFromBlockData({}, { common }) | ||
createBlockFromBlockData({}, { 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
Oops, something went wrong.