aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-17 10:43:10 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:58 +0800
commit64f26af59d24881bcdd49bbdd291c1a21a12b82d (patch)
tree4968dc2006c6cabd118fc200b85bd05dc180efd0 /dex/protocol.go
parent2818ad97f5b302f76e3296195bf8daae1868c435 (diff)
downloaddexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar.gz
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar.bz2
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar.lz
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar.xz
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.tar.zst
dexon-64f26af59d24881bcdd49bbdd291c1a21a12b82d.zip
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.
Diffstat (limited to 'dex/protocol.go')
-rw-r--r--dex/protocol.go3
1 files changed, 0 insertions, 3 deletions
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