aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-23 22:49:05 +0800
committerGitHub <noreply@github.com>2017-02-23 22:49:05 +0800
commit357732a8404c9fe4d02f041d20a0d05381a3e6d1 (patch)
treeedaf8a63eb7f7434cd9b9cbd764b3c4c3d76191e /eth/sync.go
parent29fac7de448c85049a97cbec3dc0819122bd2cb0 (diff)
parentf89dd627760b43bd405cb3db1e5efdb100835db5 (diff)
downloadgo-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.gz
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.bz2
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.lz
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.xz
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.zst
go-tangerine-357732a8404c9fe4d02f041d20a0d05381a3e6d1.zip
Merge pull request #3696 from karalabe/contextual-logger
Contextual logger
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)
}
}