diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-02 21:06:16 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-03-02 21:06:16 +0800 |
commit | 9184249b393e4e332ae6a2f5d774880a88a9bfd6 (patch) | |
tree | 7788ce54cb04d1af4fe03ab3c2447354bcaac3cc /eth/downloader/peer.go | |
parent | 82e7c1d1241737fd0ae9b25e0f20857b8597b148 (diff) | |
download | go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.gz go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.bz2 go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.lz go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.xz go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.zst go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.zip |
Logger updates 3 (#3730)
* accounts, cmd, eth, ethdb: port logs over to new system
* ethdb: drop concept of cache distribution between dbs
* eth: fix some log nitpicks to make them nicer
Diffstat (limited to 'eth/downloader/peer.go')
-rw-r--r-- | eth/downloader/peer.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index c1a9b859d..15a912f1f 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -87,7 +87,7 @@ type peer struct { getNodeData stateFetcherFn // [eth/63] Method to retrieve a batch of state trie data version int // Eth protocol version number to switch strategies - logger log.Logger // Contextual logger to add extra infos to peer logs + log log.Logger // Contextual logger to add extra infos to peer logs lock sync.RWMutex } @@ -110,7 +110,7 @@ func newPeer(id string, version int, currentHead currentHeadRetrievalFn, getNodeData: getNodeData, version: version, - logger: logger, + log: logger, } } @@ -272,7 +272,7 @@ func (p *peer) setIdle(started time.Time, delivered int, throughput *float64, id *throughput = (1-measurementImpact)*(*throughput) + measurementImpact*measured p.rtt = time.Duration((1-measurementImpact)*float64(p.rtt) + measurementImpact*float64(elapsed)) - p.logger.Trace("Peer throughput measurements updated", + p.log.Trace("Peer throughput measurements updated", "hps", p.headerThroughput, "bps", p.blockThroughput, "rps", p.receiptThroughput, "sps", p.stateThroughput, "miss", len(p.lacking), "rtt", p.rtt) |