diff options
Diffstat (limited to 'p2p/discv5/database.go')
-rw-r--r-- | p2p/discv5/database.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/p2p/discv5/database.go b/p2p/discv5/database.go index 44be8a74e..a3b044ec1 100644 --- a/p2p/discv5/database.go +++ b/p2p/discv5/database.go @@ -23,13 +23,13 @@ import ( "bytes" "crypto/rand" "encoding/binary" + "fmt" "os" "sync" "time" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" @@ -192,7 +192,7 @@ func (db *nodeDB) fetchRLP(key []byte, val interface{}) error { } err = rlp.DecodeBytes(blob, val) if err != nil { - glog.V(logger.Warn).Infof("key %x (%T) %v", key, val, err) + log.Warn(fmt.Sprintf("key %x (%T) %v", key, val, err)) } return err } @@ -244,7 +244,7 @@ func (db *nodeDB) expirer() { select { case <-tick: if err := db.expireNodes(); err != nil { - glog.V(logger.Error).Infof("Failed to expire nodedb items: %v", err) + log.Error(fmt.Sprintf("Failed to expire nodedb items: %v", err)) } case <-db.quit: @@ -396,9 +396,7 @@ func nextNode(it iterator.Iterator) *Node { } var n Node if err := rlp.DecodeBytes(it.Value(), &n); err != nil { - if glog.V(logger.Warn) { - glog.Errorf("invalid node %x: %v", id, err) - } + log.Warn(fmt.Sprintf("invalid node %x: %v", id, err)) continue } return &n |