Skip to content

Commit 2591883

Browse files
author
Gustav Simonsson
committed
Use logger.Error instead of 0 with glog
1 parent 3f306f6 commit 2591883

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎core/types/transaction.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/ethereum/go-ethereum/common"
1010
"github.com/ethereum/go-ethereum/crypto"
1111
"github.com/ethereum/go-ethereum/crypto/secp256k1"
12+
"github.com/ethereum/go-ethereum/logger"
1213
"github.com/ethereum/go-ethereum/logger/glog"
1314
"github.com/ethereum/go-ethereum/rlp"
1415
)
@@ -132,7 +133,7 @@ func (tx *Transaction) PublicKey() []byte {
132133
//pubkey, _ := secp256k1.RecoverPubkey(hash[:], sig)
133134
p, err := crypto.SigToPub(hash[:], sig)
134135
if err != nil {
135-
glog.V(0).Infof("Could not get pubkey from signature: ", err)
136+
glog.V(logger.Error).Infof("Could not get pubkey from signature: ", err)
136137
return nil
137138
}
138139
pubkey := crypto.FromECDSAPub(p)

‎core/vm/address.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"github.com/ethereum/go-ethereum/common"
77
"github.com/ethereum/go-ethereum/crypto"
8+
"github.com/ethereum/go-ethereum/logger"
89
"github.com/ethereum/go-ethereum/logger/glog"
910
"github.com/ethereum/go-ethereum/params"
1011
)
@@ -84,7 +85,7 @@ func ecrecoverFunc(in []byte) []byte {
8485
pubKey, err := crypto.Ecrecover(in[:32], rsv)
8586
// make sure the public key is a valid one
8687
if err != nil {
87-
glog.V(0).Infof("EC RECOVER FAIL: ", err)
88+
glog.V(logger.Error).Infof("EC RECOVER FAIL: ", err)
8889
return nil
8990
}
9091

‎whisper/message.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"time"
66

77
"github.com/ethereum/go-ethereum/crypto"
8+
"github.com/ethereum/go-ethereum/logger"
89
"github.com/ethereum/go-ethereum/logger/glog"
910
)
1011

@@ -35,7 +36,7 @@ func (self *Message) Recover() *ecdsa.PublicKey {
3536
defer func() { recover() }() // in case of invalid sig
3637
pub, err := crypto.SigToPub(self.hash(), self.Signature)
3738
if err != nil {
38-
glog.V(0).Infof("Could not get pubkey from signature: ", err)
39+
glog.V(logger.Error).Infof("Could not get pubkey from signature: ", err)
3940
return nil
4041
}
4142
return pub

0 commit comments

Comments
 (0)