diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-25 19:28:17 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-25 20:11:29 +0800 |
commit | 18d1569ce50e0348bf9649a31f711ee8037304d8 (patch) | |
tree | 10adc68d59976bd98e07504467edaef92f12e006 /blockpool/peers_test.go | |
parent | 9d592c0445aa8bb85921225a9cdc4ca1d4df85d3 (diff) | |
download | go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.gz go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.tar.zst go-tangerine-18d1569ce50e0348bf9649a31f711ee8037304d8.zip |
header check for test
Diffstat (limited to 'blockpool/peers_test.go')
-rw-r--r-- | blockpool/peers_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/blockpool/peers_test.go b/blockpool/peers_test.go index beeb0ad1d..62e059337 100644 --- a/blockpool/peers_test.go +++ b/blockpool/peers_test.go @@ -14,7 +14,7 @@ import ( // the actual tests func TestAddPeer(t *testing.T) { test.LogInit() - _, blockPool, blockPoolTester := newTestBlockPool(t) + hashPool, blockPool, blockPoolTester := newTestBlockPool(t) peer0 := blockPoolTester.newPeer("peer0", 1, 1) peer1 := blockPoolTester.newPeer("peer1", 2, 2) peer2 := blockPoolTester.newPeer("peer2", 3, 3) @@ -119,7 +119,8 @@ func TestAddPeer(t *testing.T) { } peer0.waitBlocksRequests(3) - newblock := &types.Block{Td: common.Big3} + hash := hashPool.IndexesToHashes([]int{0})[0] + newblock := &types.Block{Td: common.Big3, HeaderHash: hash} blockPool.chainEvents.Post(core.ChainHeadEvent{newblock}) time.Sleep(100 * time.Millisecond) if blockPool.peers.best != nil { |