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@byzantine-lab.io>2019-06-12 17:21:31 +0800
commit94bb940818d9b5c6d654da14f13918e65cf84623 (patch)
tree27c40976f1a1ee43ea717673e771b7eef9e93729 /dex/protocol.go
parent42e9b9b25d21f40f7d4ebfbb0e7cbca0f1ade6d4 (diff)
downloadgo-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar.gz
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar.bz2
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar.lz
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar.xz
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.tar.zst
go-tangerine-94bb940818d9b5c6d654da14f13918e65cf84623.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