aboutsummaryrefslogtreecommitdiffstats
path: root/eth/helper_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-31 00:39:32 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-31 00:42:00 +0800
commit566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2 (patch)
treed1b99b9caab92cce3f6a6a4f8dcafb66a892e13a /eth/helper_test.go
parent6198c53e28200b3a575f4545cbfa83c585e44b76 (diff)
downloadgo-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.gz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.bz2
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.lz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.xz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.zst
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.zip
core, eth, les, light: get rid of redundant methods
Diffstat (limited to 'eth/helper_test.go')
-rw-r--r--eth/helper_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/eth/helper_test.go b/eth/helper_test.go
index d44574b86..9a4dc9010 100644
--- a/eth/helper_test.go
+++ b/eth/helper_test.go
@@ -166,8 +166,12 @@ func newTestPeer(name string, version int, pm *ProtocolManager, shake bool) (*te
tp := &testPeer{app: app, net: net, peer: peer}
// Execute any implicitly requested handshakes and return
if shake {
- td, head, genesis := pm.blockchain.Status()
- tp.handshake(nil, td, head, genesis)
+ var (
+ genesis = pm.blockchain.Genesis()
+ head = pm.blockchain.CurrentHeader()
+ td = pm.blockchain.GetTd(head.Hash(), head.Number.Uint64())
+ )
+ tp.handshake(nil, td, head.Hash(), genesis.Hash())
}
return tp, errc
}