Skip to content

Commit

Permalink
Merge pull request #2094 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
core/types: don't modify signature V when reading large chainID
  • Loading branch information
ucwong authored Jul 17, 2024
2 parents cf14d92 + a7a9d8c commit 444e6d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/types/transaction_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,6 @@ func deriveChainId(v *big.Int) *big.Int {
}
return new(big.Int).SetUint64((v - 35) / 2)
}
v.Sub(v, big.NewInt(35))
return v.Rsh(v, 1)
vCopy := new(big.Int).Sub(v, big.NewInt(35))
return vCopy.Rsh(vCopy, 1)
}

0 comments on commit 444e6d3

Please sign in to comment.