From 748abd39f68b44408555dc6eb6648999f6b5a7ad Mon Sep 17 00:00:00 2001 From: primal_concrete_sledge Date: Tue, 11 Jan 2022 17:23:24 +0300 Subject: [PATCH] Suggesting fix for data race (#3236) --- core/types/transaction_signing.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index 454bd0300..e6b5b11bb 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -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) }