aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/blockpool.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-25 19:28:17 +0800
committerzelig <viktor.tron@gmail.com>2015-03-25 20:11:29 +0800
commit18d1569ce50e0348bf9649a31f711ee8037304d8 (patch)
tree10adc68d59976bd98e07504467edaef92f12e006 /blockpool/blockpool.go
parent9d592c0445aa8bb85921225a9cdc4ca1d4df85d3 (diff)
downloadgo-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.gz
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.bz2
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.lz
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.xz
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.zst
go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.zip
header check for test
Diffstat (limited to 'blockpool/blockpool.go')
-rw-r--r--blockpool/blockpool.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go
index 46eac3549..d9f8e3baa 100644
--- a/blockpool/blockpool.go
+++ b/blockpool/blockpool.go
@@ -238,7 +238,11 @@ func (self *BlockPool) Start() {
case event := <-self.tdSub.Chan():
if ev, ok := event.(core.ChainHeadEvent); ok {
td := ev.Block.Td
- plog.DebugDetailf("ChainHeadEvent: height: %v, td: %v, hash: %s", ev.Block.Number(), td, hex(ev.Block.Hash()))
+ var height *big.Int
+ if (ev.Block.HeaderHash == common.Hash{}) {
+ height = ev.Block.Header().Number
+ }
+ plog.DebugDetailf("ChainHeadEvent: height: %v, td: %v, hash: %s", height, td, hex(ev.Block.Hash()))
self.setTD(td)
self.peers.lock.Lock()