mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Update transaction_signing.go
This commit is contained in:
parent
f4817b7a53
commit
26df1d65f0
1 changed files with 5 additions and 5 deletions
|
|
@ -265,7 +265,7 @@ func (s *modernSigner) Sender(tx *Transaction) (common.Address, error) {
|
||||||
// 'modern' txs are defined to use 0 and 1 as their recovery
|
// 'modern' txs are defined to use 0 and 1 as their recovery
|
||||||
// id, add 27 to become equivalent to unprotected Homestead signatures.
|
// id, add 27 to become equivalent to unprotected Homestead signatures.
|
||||||
V, R, S := tx.RawSignatureValues()
|
V, R, S := tx.RawSignatureValues()
|
||||||
V = new(big.Int).Add(V, big.NewInt(27))
|
V = new(big.Int).Add(V, big27)
|
||||||
return recoverPlain(s.Hash(tx), R, S, V, true)
|
return recoverPlain(s.Hash(tx), R, S, V, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -349,10 +349,10 @@ func (s EIP155Signer) Equal(s2 Signer) bool {
|
||||||
return ok && eip155.chainId.Cmp(s.chainId) == 0
|
return ok && eip155.chainId.Cmp(s.chainId) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
var big8 = big.NewInt(8)
|
var (
|
||||||
|
big27 = big.NewInt(27)
|
||||||
func (s EIP155Signer) Sender(tx *Transaction) (common.Address, error) {
|
big8 = big.NewInt(8)
|
||||||
if tx.Type() != LegacyTxType {
|
)
|
||||||
return common.Address{}, ErrTxTypeNotSupported
|
return common.Address{}, ErrTxTypeNotSupported
|
||||||
}
|
}
|
||||||
if !tx.Protected() {
|
if !tx.Protected() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue