Fix types.Difficulty Float64() off by one error
This commit is contained in:
parent
44d969a218
commit
446929e7be
|
@ -188,7 +188,7 @@ func (d Difficulty) Big() *big.Int {
|
|||
}
|
||||
|
||||
func (d Difficulty) Float64() float64 {
|
||||
return float64(d.Lo) + float64(d.Hi)*math.MaxUint64
|
||||
return float64(d.Lo) + float64(d.Hi)*(float64(math.MaxUint64)+1)
|
||||
}
|
||||
|
||||
func (d Difficulty) MarshalJSON() ([]byte, error) {
|
||||
|
|
Loading…
Reference in a new issue