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
2591883a
Commit
2591883a
authored
Apr 07, 2015
by
Gustav Simonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use logger.Error instead of 0 with glog
parent
3f306f63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
transaction.go
core/types/transaction.go
+2
-1
address.go
core/vm/address.go
+2
-1
message.go
whisper/message.go
+2
-1
No files found.
core/types/transaction.go
View file @
2591883a
...
...
@@ -9,6 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/rlp"
)
...
...
@@ -132,7 +133,7 @@ func (tx *Transaction) PublicKey() []byte {
//pubkey, _ := secp256k1.RecoverPubkey(hash[:], sig)
p
,
err
:=
crypto
.
SigToPub
(
hash
[
:
],
sig
)
if
err
!=
nil
{
glog
.
V
(
0
)
.
Infof
(
"Could not get pubkey from signature: "
,
err
)
glog
.
V
(
logger
.
Error
)
.
Infof
(
"Could not get pubkey from signature: "
,
err
)
return
nil
}
pubkey
:=
crypto
.
FromECDSAPub
(
p
)
...
...
core/vm/address.go
View file @
2591883a
...
...
@@ -5,6 +5,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/params"
)
...
...
@@ -84,7 +85,7 @@ func ecrecoverFunc(in []byte) []byte {
pubKey
,
err
:=
crypto
.
Ecrecover
(
in
[
:
32
],
rsv
)
// make sure the public key is a valid one
if
err
!=
nil
{
glog
.
V
(
0
)
.
Infof
(
"EC RECOVER FAIL: "
,
err
)
glog
.
V
(
logger
.
Error
)
.
Infof
(
"EC RECOVER FAIL: "
,
err
)
return
nil
}
...
...
whisper/message.go
View file @
2591883a
...
...
@@ -5,6 +5,7 @@ import (
"time"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
)
...
...
@@ -35,7 +36,7 @@ func (self *Message) Recover() *ecdsa.PublicKey {
defer
func
()
{
recover
()
}()
// in case of invalid sig
pub
,
err
:=
crypto
.
SigToPub
(
self
.
hash
(),
self
.
Signature
)
if
err
!=
nil
{
glog
.
V
(
0
)
.
Infof
(
"Could not get pubkey from signature: "
,
err
)
glog
.
V
(
logger
.
Error
)
.
Infof
(
"Could not get pubkey from signature: "
,
err
)
return
nil
}
return
pub
...
...
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