From 5f64e1d10d620a8a299ff3a40695f26107f157c5 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Sun, 17 Mar 2019 10:43:10 +0800 Subject: core: fill in genesis timstamp and remove dMoment from protocol handshake (#263) Fill in dmoment as genesis block timestamp. This allow us to remove dMoment check from protocol handshake since genesis block hash itself will protect us against different dMoment. --- dex/protocol.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'dex/protocol.go') diff --git a/dex/protocol.go b/dex/protocol.go index afa6e560d..e09829cc8 100644 --- a/dex/protocol.go +++ b/dex/protocol.go @@ -106,7 +106,6 @@ const ( ErrInvalidMsgCode ErrProtocolVersionMismatch ErrNetworkIdMismatch - ErrDMomentMismatch ErrGenesisBlockMismatch ErrNoStatusMsg ErrExtraStatusMsg @@ -129,7 +128,6 @@ var errorToString = map[int]string{ ErrInvalidMsgCode: "Invalid message code", ErrProtocolVersionMismatch: "Protocol version mismatch", ErrNetworkIdMismatch: "NetworkId mismatch", - ErrDMomentMismatch: "DMoment mismatch", ErrGenesisBlockMismatch: "Genesis block mismatch", ErrNoStatusMsg: "No status message", ErrExtraStatusMsg: "Extra status message", @@ -180,7 +178,6 @@ type p2pServer interface { type statusData struct { ProtocolVersion uint32 NetworkId uint64 - DMoment uint64 Number uint64 CurrentBlock common.Hash GenesisBlock common.Hash -- cgit v1.2.3