aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-28 21:36:51 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-28 21:36:51 +0800
commite02883c0a2a9aa70de6b80413ca40dca833c4946 (patch)
treea722ade4f0a3ad46ad4e2eb3a87dfd5915c77e05 /core
parente588e0ca2b3b615af0ecfd5679c42df8f1cc4272 (diff)
downloaddexon-e02883c0a2a9aa70de6b80413ca40dca833c4946.tar.gz
dexon-e02883c0a2a9aa70de6b80413ca40dca833c4946.tar.zst
dexon-e02883c0a2a9aa70de6b80413ca40dca833c4946.zip
core, log: track field length and pad to align
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go10
-rw-r--r--core/headerchain.go4
2 files changed, 7 insertions, 7 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 27dbf6c6d..88ba76bc7 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -798,8 +798,8 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain
// Report some public statistics so the user has a clue what's going on
last := blockChain[len(blockChain)-1]
- log.Info("Imported new block receipts", "count", stats.processed, "number", last.Number(), "hash", last.Hash(),
- "elapsed", common.PrettyDuration(time.Since(start)), "ignored", stats.ignored)
+ log.Info("Imported new block receipts", "count", stats.processed, "elapsed", common.PrettyDuration(time.Since(start)),
+ "number", last.Number(), "hash", last.Hash(), "ignored", stats.ignored)
return 0, nil
}
@@ -1054,9 +1054,9 @@ func (st *insertStats) report(chain []*types.Block, index int) {
txs = countTransactions(chain[st.lastIndex : index+1])
)
context := []interface{}{
- "blocks", st.processed, "number", end.Number(), "hash", end.Hash(), "txs", txs,
- "mgas", float64(st.usedGas) / 1000000, "elapsed", common.PrettyDuration(elapsed),
- "mgasps", float64(st.usedGas) * 1000 / float64(elapsed),
+ "blocks", st.processed, "txs", txs, "mgas", float64(st.usedGas) / 1000000,
+ "elapsed", common.PrettyDuration(elapsed), "mgasps", float64(st.usedGas) * 1000 / float64(elapsed),
+ "number", end.Number(), "hash", end.Hash(),
}
if st.queued > 0 {
context = append(context, []interface{}{"queued", st.queued}...)
diff --git a/core/headerchain.go b/core/headerchain.go
index 775321bc6..5f6073917 100644
--- a/core/headerchain.go
+++ b/core/headerchain.go
@@ -330,8 +330,8 @@ func (hc *HeaderChain) InsertHeaderChain(chain []*types.Header, checkFreq int, w
}
// Report some public statistics so the user has a clue what's going on
last := chain[len(chain)-1]
- log.Info("Imported new block headers", "count", stats.processed, "number", last.Number, "hash", last.Hash(),
- "elapsed", common.PrettyDuration(time.Since(start)), "ignored", stats.ignored)
+ log.Info("Imported new block headers", "count", stats.processed, "elapsed", common.PrettyDuration(time.Since(start)),
+ "number", last.Number, "hash", last.Hash(), "ignored", stats.ignored)
return 0, nil
}