From c08afdbc7741d4559683ff304157303af8766c89 Mon Sep 17 00:00:00 2001 From: Sonic Date: Tue, 25 Sep 2018 20:37:11 +0800 Subject: dex: redesign p2p network topology - Let p2p server support direct connection and group connection. - Introduce node meta table to maintain IP of all nodes in node set, in memory and let nodes in the network can sync this table. - Let peerSet able to manage direct connections to notary set and dkg set. The mechanism to refresh the network topology when configuration round change is not done yet. --- dex/network.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'dex/network.go') diff --git a/dex/network.go b/dex/network.go index c3a0ef792..b19b46147 100644 --- a/dex/network.go +++ b/dex/network.go @@ -23,14 +23,6 @@ func (n *DexconNetwork) BroadcastVote(vote *types.Vote) { func (n *DexconNetwork) BroadcastBlock(block *types.Block) { } -// BroadcastRandomnessRequest broadcasts rand request to DKG set. -func (n *DexconNetwork) BroadcastRandomnessRequest(randRequest *types.AgreementResult) { -} - -// BroadcastRandomnessResult broadcasts rand request to Notary set. -func (n *DexconNetwork) BroadcastRandomnessResult(randResult *types.BlockRandomnessResult) { -} - // SendDKGPrivateShare sends PrivateShare to a DKG participant. func (n *DexconNetwork) SendDKGPrivateShare( pub crypto.PublicKey, prvShare *types.DKGPrivateShare) { @@ -47,6 +39,15 @@ func (n *DexconNetwork) BroadcastDKGPartialSignature( psig *types.DKGPartialSignature) { } +// BroadcastRandomnessRequest broadcasts rand request to DKG set. +func (n *DexconNetwork) BroadcastRandomnessRequest(randRequest *types.AgreementResult) { + +} + +// BroadcastRandomnessResult broadcasts rand request to Notary set. +func (n *DexconNetwork) BroadcastRandomnessResult(randResult *types.BlockRandomnessResult) { +} + // ReceiveChan returns a channel to receive messages from DEXON network. func (n *DexconNetwork) ReceiveChan() <-chan interface{} { return n.receiveChan -- cgit