aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol.go
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-12-04 16:13:41 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitf8df1206a75557714062905d4b802f337e680a42 (patch)
tree19d70a04c9edfcee2e52d3ff328ee0587706d5e8 /dex/protocol.go
parent511054aa3d3b8d1e4eab33d891ef212196b50f6d (diff)
downloaddexon-f8df1206a75557714062905d4b802f337e680a42.tar
dexon-f8df1206a75557714062905d4b802f337e680a42.tar.gz
dexon-f8df1206a75557714062905d4b802f337e680a42.tar.bz2
dexon-f8df1206a75557714062905d4b802f337e680a42.tar.lz
dexon-f8df1206a75557714062905d4b802f337e680a42.tar.xz
dexon-f8df1206a75557714062905d4b802f337e680a42.tar.zst
dexon-f8df1206a75557714062905d4b802f337e680a42.zip
dex: replace total difficulty with block number (#73)
In dexon, we don't "mine" and the blockchain won't and shouldn't fork, so there is no difficulty concept, just replace it with block number. Note: this commit only replace total difficulty related logic and code in dex, dex/downloader package.
Diffstat (limited to 'dex/protocol.go')
-rw-r--r--dex/protocol.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/dex/protocol.go b/dex/protocol.go
index 21168e917..49bd0cc20 100644
--- a/dex/protocol.go
+++ b/dex/protocol.go
@@ -37,7 +37,6 @@ import (
"crypto/ecdsa"
"fmt"
"io"
- "math/big"
"github.com/dexon-foundation/dexon/common"
"github.com/dexon-foundation/dexon/core"
@@ -172,7 +171,7 @@ type p2pServer interface {
type statusData struct {
ProtocolVersion uint32
NetworkId uint64
- TD *big.Int
+ Number uint64
CurrentBlock common.Hash
GenesisBlock common.Hash
}
@@ -232,7 +231,6 @@ func (hn *hashOrNumber) DecodeRLP(s *rlp.Stream) error {
// newBlockData is the network packet for the block propagation message.
type newBlockData struct {
Block *types.Block
- TD *big.Int
}
// blockBody represents the data content of a single block.