aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 20:10:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:44 +0800
commitd4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch)
tree17c93170551d3eeabe2935de1765f157007f0dc2 /eth/sync.go
parent47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff)
downloadgo-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.gz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.bz2
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.lz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.xz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.zst
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.zip
all: blidly swap out glog to our log15, logs need rework
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/eth/sync.go b/eth/sync.go
index 373cc2054..1075578b9 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -17,6 +17,7 @@
package eth
import (
+ "fmt"
"math/rand"
"sync/atomic"
"time"
@@ -24,8 +25,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/downloader"
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/discover"
)
@@ -87,7 +87,7 @@ func (pm *ProtocolManager) txsyncLoop() {
delete(pending, s.p.ID())
}
// Send the pack in the background.
- glog.V(logger.Detail).Infof("%v: sending %d transactions (%v)", s.p.Peer, len(pack.txs), size)
+ log.Trace(fmt.Sprintf("%v: sending %d transactions (%v)", s.p.Peer, len(pack.txs), size))
sending = true
go func() { done <- pack.p.SendTransactions(pack.txs) }()
}
@@ -117,7 +117,7 @@ func (pm *ProtocolManager) txsyncLoop() {
sending = false
// Stop tracking peers that cause send failures.
if err != nil {
- glog.V(logger.Debug).Infof("%v: tx send failed: %v", pack.p.Peer, err)
+ log.Debug(fmt.Sprintf("%v: tx send failed: %v", pack.p.Peer, err))
delete(pending, pack.p.ID())
}
// Schedule the next send.
@@ -187,7 +187,7 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
if atomic.LoadUint32(&pm.fastSync) == 1 {
// Disable fast sync if we indeed have something in our chain
if pm.blockchain.CurrentBlock().NumberU64() > 0 {
- glog.V(logger.Info).Infof("fast sync complete, auto disabling")
+ log.Info(fmt.Sprintf("fast sync complete, auto disabling"))
atomic.StoreUint32(&pm.fastSync, 0)
}
}