From 94bb940818d9b5c6d654da14f13918e65cf84623 Mon Sep 17 00:00:00 2001 From: Sonic Date: Tue, 25 Sep 2018 16:53:56 +0800 Subject: dex: implement notary node info propagation and management mechanism --- dex/protocol.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dex/protocol.go') 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 -- cgit v1.2.3