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>2018-12-19 18:45:25 +0800
commit5966f431920a13294b0d867285d5e0d28b5ee470 (patch)
tree0789ee23edc47da4b2414b3540bd4a5630d43aa9 /dex/protocol.go
parent1bf9c75cf597f9786e8a34bd1f3b36f9f09d7bfb (diff)
downloaddexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar.gz
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar.bz2
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar.lz
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar.xz
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.tar.zst
dexon-5966f431920a13294b0d867285d5e0d28b5ee470.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