diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-27 02:19:11 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-27 02:19:11 +0800 |
commit | e20b11305366c8d05ea626eda0bb46fba5b373ec (patch) | |
tree | f5a28256c145ce57fa905ef890c9ba1a41bf3f91 /block_pool.go | |
parent | 0acdeca3d6df4716d8789444c7bb645c73a27324 (diff) | |
download | dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.gz dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.bz2 dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.lz dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.xz dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.tar.zst dexon-e20b11305366c8d05ea626eda0bb46fba5b373ec.zip |
Logging messages
Diffstat (limited to 'block_pool.go')
-rw-r--r-- | block_pool.go | 4 |
1 files changed, 3 insertions, 1 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} |