Skip to content

Commit 3a5a559

Browse files
rjl493456442karalabe
authored andcommitted
consensus/ethash: fix byzantium difficulty comment typo (#15842)
1 parent 83d1657 commit 3a5a559

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎consensus/ethash/consensus.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func calcDifficultyByzantium(time uint64, parent *types.Header) *big.Int {
347347
if x.Cmp(bigMinus99) < 0 {
348348
x.Set(bigMinus99)
349349
}
350-
// (parent_diff + parent_diff // 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99))
350+
// parent_diff + (parent_diff / 2048 * max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99))
351351
y.Div(parent.Difficulty, params.DifficultyBoundDivisor)
352352
x.Mul(y, x)
353353
x.Add(parent.Difficulty, x)

0 commit comments

Comments
 (0)