diff options
author | Sonic <sonic@cobinhood.com> | 2018-10-14 22:39:11 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:39 +0800 |
commit | f4d15de52885a472ffb4ae5982662ec3f41ebebc (patch) | |
tree | 7ac7bdb3724e63a55930382edfb30d2283ce028b /dex/handler.go | |
parent | 2e1556d551420e5f52d6e4e157b46963277eaccd (diff) | |
download | go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar.gz go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar.bz2 go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar.lz go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar.xz go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.tar.zst go-tangerine-f4d15de52885a472ffb4ae5982662ec3f41ebebc.zip |
dex: add method to get NumChains, NotarySet, DKGSet easily
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 7 |
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) |