aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol.go
diff options
context:
space:
mode:
authorSonic <sonic@cobinhood.com>2018-09-25 16:53:56 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:48 +0800
commitb05f0240d48ba0c0c3f9cb1fec948b05733f2ba3 (patch)
tree14170b1371d8ec4c74cdf8d5a616860eb8b07dc7 /dex/protocol.go
parent8c2ff681e2d5718b5b91fa41707eb64423fdd306 (diff)
downloaddexon-b05f0240d48ba0c0c3f9cb1fec948b05733f2ba3.tar.gz
dexon-b05f0240d48ba0c0c3f9cb1fec948b05733f2ba3.tar.zst
dexon-b05f0240d48ba0c0c3f9cb1fec948b05733f2ba3.zip
dex: implement notary node info propagation and management mechanism
Diffstat (limited to 'dex/protocol.go')
-rw-r--r--dex/protocol.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/dex/protocol.go b/dex/protocol.go
index 6452d854a..8aa16db2f 100644
--- a/dex/protocol.go
+++ b/dex/protocol.go
@@ -22,12 +22,13 @@ import (
"math/big"
"net"
- "github.com/dexon-foundation/dexon/crypto/sha3"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/p2p/discover"
+ "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -113,6 +114,14 @@ type txPool interface {
SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
}
+type p2pServer interface {
+ Self() *enode.Node
+
+ AddNotaryPeer(*discover.Node)
+
+ RemoveNotaryPeer(*discover.Node)
+}
+
// statusData is the network packet for the status message.
type statusData struct {
ProtocolVersion uint32