From e20b11305366c8d05ea626eda0bb46fba5b373ec Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 26 Sep 2014 20:19:11 +0200 Subject: Logging messages --- block_pool.go | 4 +++- ethchain/state_manager.go | 2 +- 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) -- cgit