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>2019-04-09 21:32:49 +0800
commitee4b3e32c5040251b861a23cb8d8ddc41b232ce4 (patch)
tree38a77a9e61cf7b27141284589fb6e83103e21eef /dex/handler.go
parent031fe42b08bb576b250a81e1e3885f15910551c5 (diff)
downloaddexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar.gz
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar.bz2
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar.lz
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar.xz
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.tar.zst
dexon-ee4b3e32c5040251b861a23cb8d8ddc41b232ce4.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)