aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-18 12:15:30 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-18 12:15:30 +0800
commitd10d466681c8cb72ba6c435f9b97f037699b036d (patch)
tree1ec5ef1f3acb45c86fd93579153f10ce8bb4a090
parentbe5da8862281a48c50d7ce89bf35cc6580dca0f7 (diff)
downloaddexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar.gz
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar.bz2
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar.lz
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar.xz
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.tar.zst
dexon-d10d466681c8cb72ba6c435f9b97f037699b036d.zip
fixup! core: fill in genesis timstamp and remove dMoment from protocol handshake (#263)
-rw-r--r--dex/helper_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/dex/helper_test.go b/dex/helper_test.go
index d3c67c48c..4f5541052 100644
--- a/dex/helper_test.go
+++ b/dex/helper_test.go
@@ -46,8 +46,6 @@ var (
testBank = crypto.PubkeyToAddress(testBankKey.PublicKey)
)
-const dMoment = 123456
-
// testP2PServer is a fake, helper p2p server for testing purposes.
type testP2PServer struct {
mu sync.Mutex
@@ -275,14 +273,14 @@ func newTestPeer(name string, version int, pm *ProtocolManager, shake bool) (*te
head = pm.blockchain.CurrentHeader()
number = head.Number.Uint64()
)
- tp.handshake(nil, dMoment, number, head.Hash(), genesis.Hash())
+ tp.handshake(nil, number, head.Hash(), genesis.Hash())
}
return tp, errc
}
// handshake simulates a trivial handshake that expects the same state from the
// remote side as we are simulating locally.
-func (p *testPeer) handshake(t *testing.T, dMoment uint64, number uint64, head common.Hash, genesis common.Hash) {
+func (p *testPeer) handshake(t *testing.T, number uint64, head common.Hash, genesis common.Hash) {
msg := &statusData{
ProtocolVersion: uint32(p.version),
NetworkId: DefaultConfig.NetworkId,