Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ffca6dfe
Commit
ffca6dfe
authored
Sep 29, 2018
by
thumb8432
Committed by
Felix Lange
Sep 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/types: fix typos (#17762)
parent
107f556b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
transaction_signing.go
core/types/transaction_signing.go
+2
-2
No files found.
core/types/transaction_signing.go
View file @
ffca6dfe
...
@@ -227,13 +227,13 @@ func recoverPlain(sighash common.Hash, R, S, Vb *big.Int, homestead bool) (commo
...
@@ -227,13 +227,13 @@ func recoverPlain(sighash common.Hash, R, S, Vb *big.Int, homestead bool) (commo
if
!
crypto
.
ValidateSignatureValues
(
V
,
R
,
S
,
homestead
)
{
if
!
crypto
.
ValidateSignatureValues
(
V
,
R
,
S
,
homestead
)
{
return
common
.
Address
{},
ErrInvalidSig
return
common
.
Address
{},
ErrInvalidSig
}
}
// encode the snature in uncompressed format
// encode the s
ig
nature in uncompressed format
r
,
s
:=
R
.
Bytes
(),
S
.
Bytes
()
r
,
s
:=
R
.
Bytes
(),
S
.
Bytes
()
sig
:=
make
([]
byte
,
65
)
sig
:=
make
([]
byte
,
65
)
copy
(
sig
[
32
-
len
(
r
)
:
32
],
r
)
copy
(
sig
[
32
-
len
(
r
)
:
32
],
r
)
copy
(
sig
[
64
-
len
(
s
)
:
64
],
s
)
copy
(
sig
[
64
-
len
(
s
)
:
64
],
s
)
sig
[
64
]
=
V
sig
[
64
]
=
V
// recover the public key from the snature
// recover the public key from the s
ig
nature
pub
,
err
:=
crypto
.
Ecrecover
(
sighash
[
:
],
sig
)
pub
,
err
:=
crypto
.
Ecrecover
(
sighash
[
:
],
sig
)
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Address
{},
err
return
common
.
Address
{},
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment