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-03-07 18:45:19 +0800
commitee0c68dff2488af88b2c128bf5ac56410e6d740f (patch)
tree796b6016d46a716f2783f35d91b963059c45d1bb /dex/protocol.go
parentc98616fb90c44c19b636da90ac69149c8d6a21e1 (diff)
downloaddexon-ee0c68dff2488af88b2c128bf5ac56410e6d740f.tar.gz
dexon-ee0c68dff2488af88b2c128bf5ac56410e6d740f.tar.zst
dexon-ee0c68dff2488af88b2c128bf5ac56410e6d740f.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