Skip to content

Commit f05714f

Browse files
holgerd77ryanio
andauthored
block, vm -> release: README updates from review
Co-authored-by: Ryan Ghods <[email protected]>
1 parent a713a7e commit f05714f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/block/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ console.log(common.consensusAlgorithm()) // 'ethash'
7474
const block = Block.fromBlockData({}, { common })
7575
```
7676

77-
TODO
77+
To validate that the difficulty of the block matches the canonical difficulty use `block.validate(blockchain)`.
78+
79+
To calculate the difficulty when creating the block pass in the block option `calcDifficultyFromHeader` with the preceding (parent) `BlockHeader`.
7880

7981
## Clique/PoA (since v3.1.0)
8082

packages/vm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Starting with `v5.1.0` the VM supports running both `Ethash/PoW` and `Clique/PoA
8181

8282
### Ethash/PoW Chains
8383

84-
TODO
84+
`@ethereumjs/blockchain` validates the PoW algorithm with `@ethereumjs/ethash` and validates blocks' difficulty to match their canonical difficulty.
8585

8686
### Clique/PoA Chains
8787

0 commit comments

Comments
 (0)