aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-27 02:19:11 +0800
committerobscuren <geffobscura@gmail.com>2014-09-27 02:19:11 +0800
commite20b11305366c8d05ea626eda0bb46fba5b373ec (patch)
treef5a28256c145ce57fa905ef890c9ba1a41bf3f91
parent0acdeca3d6df4716d8789444c7bb645c73a27324 (diff)
downloadgo-tangerine-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.gz
go-tangerine-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.zst
go-tangerine-e20b11305366c8d05ea626eda0bb46fba5b373ec.zip
Logging messages
-rw-r--r--block_pool.go4
-rw-r--r--ethchain/state_manager.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/block_pool.go b/block_pool.go
index f768f0f60..73507a185 100644
--- a/block_pool.go
+++ b/block_pool.go
@@ -14,7 +14,7 @@ import (
"github.com/ethereum/eth-go/ethwire"
)
-var poollogger = ethlog.NewLogger("[BPOOL]")
+var poollogger = ethlog.NewLogger("BPOOL")
type block struct {
from *Peer
@@ -71,6 +71,8 @@ func (self *BlockPool) SetBlock(b *ethchain.Block, peer *Peer) {
hash := string(b.Hash())
if self.pool[hash] == nil && !self.eth.BlockChain().HasBlock(b.Hash()) {
+ poollogger.Infof("Got unrequested block (%x...)\n", hash[0:4])
+
self.hashPool = append(self.hashPool, b.Hash())
self.pool[hash] = &block{peer, peer, b, time.Now(), 0}
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index 8088f6735..6bcbe063e 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -251,7 +251,7 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) {
fk := append([]byte("bloom"), block.Hash()...)
sm.Ethereum.Db().Put(fk, filter.Bin())
- statelogger.Debugf("Added block #%d (%x)\n", block.Number, block.Hash())
+ statelogger.Infof("Imported block #%d (%x...)\n", block.Number, block.Hash()[0:4])
if dontReact == false {
sm.Ethereum.Reactor().Post("newBlock", block)