Suggesting fix for data race (#3236)

This commit is contained in:
primal_concrete_sledge 2022-01-11 17:23:24 +03:00 committed by GitHub
parent 359477c7e0
commit 748abd39f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,6 +344,6 @@ func DeriveChainId(v *uint256.Int) *uint256.Int {
}
return new(uint256.Int).SetUint64((v - 35) / 2)
}
v = new(uint256.Int).Sub(v, u256.Num35)
return v.Div(v, u256.Num2)
r := new(uint256.Int).Sub(v, u256.Num35)
return r.Div(r, u256.Num2)
}