aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorSonic <sonic@cobinhood.com>2018-10-14 22:39:11 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commitbc4075d5c095ea29f576f546fdeb245a0e00d4ea (patch)
tree4b36b7433d9730638e5ebf2acf22f48650de11e0 /dex/handler.go
parent95379029f2e3eb0ffd2c1a6c151100062cb5d5cc (diff)
downloaddexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar.gz
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar.bz2
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar.lz
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar.xz
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.tar.zst
dexon-bc4075d5c095ea29f576f546fdeb245a0e00d4ea.zip
dex: add method to get NumChains, NotarySet, DKGSet easily
Diffstat (limited to 'dex/handler.go')
-rw-r--r--dex/handler.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/dex/handler.go b/dex/handler.go
index e013b9722..5613efdd8 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -26,7 +26,7 @@ import (
"sync/atomic"
"time"
- "github.com/dexon-foundation/dexon-consensus-core/core/crypto"
+ coreCrypto "github.com/dexon-foundation/dexon-consensus-core/core/crypto"
coreTypes "github.com/dexon-foundation/dexon-consensus-core/core/types"
"github.com/dexon-foundation/dexon/common"
@@ -240,7 +240,7 @@ func (pm *ProtocolManager) Start(srvr p2pServer, maxPeers int) {
// run the peer set loop
pm.crsCh = make(chan core.NewCRSEvent)
- pm.crsSub = pm.gov.SubscribeNewCRSEvent(pm.crsCh)
+ // pm.crsSub = pm.gov.SubscribeNewCRSEvent(pm.crsCh)
go pm.peerSetLoop()
// start sync handlers
@@ -680,7 +680,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
case msg.Code == LatticeBlockMsg:
var rb rlpLatticeBlock
if err := msg.Decode(&rb); err != nil {
- fmt.Println("decode lattice block error", err)
return errResp(ErrDecode, "msg %v: %v", msg, err)
}
pm.receiveCh <- fromRLPLatticeBlock(&rb)
@@ -815,7 +814,7 @@ func (pm *ProtocolManager) BroadcastLatticeBlock(block *coreTypes.Block) {
// TODO(sonic): try to reduce traffic
func (pm *ProtocolManager) SendDKGPrivateShare(
- pub crypto.PublicKey, privateShare *coreTypes.DKGPrivateShare) {
+ pub coreCrypto.PublicKey, privateShare *coreTypes.DKGPrivateShare) {
id := discover.MustBytesID(pub.Bytes()[1:])
if p := pm.peers.Peer(id.String()); p != nil {
p.AsyncSendDKGPrivateShare(privateShare)