diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-25 11:17:52 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:52 +0800 |
commit | 2d1ed5288cab621aba39c3a81aae7042ead14fd5 (patch) | |
tree | 3312352700814c6e97305b84a58672ee1f059e66 /dex/handler.go | |
parent | f5fa30b21ea123d66cf5fdaf527f546ef5a2f46b (diff) | |
download | dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar.gz dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar.bz2 dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar.lz dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar.xz dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.tar.zst dexon-2d1ed5288cab621aba39c3a81aae7042ead14fd5.zip |
vendor: sync consensus core and fix conflict
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dex/handler.go b/dex/handler.go index 2b7e1cee1..be50cb43d 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -28,6 +28,7 @@ import ( coreCrypto "github.com/dexon-foundation/dexon-consensus-core/core/crypto" coreTypes "github.com/dexon-foundation/dexon-consensus-core/core/types" + dkgTypes "github.com/dexon-foundation/dexon-consensus-core/core/types/dkg" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/consensus" @@ -736,14 +737,14 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { pm.receiveCh <- &randomness case msg.Code == DKGPrivateShareMsg: // Do not relay this msg - var ps coreTypes.DKGPrivateShare + var ps dkgTypes.PrivateShare if err := msg.Decode(&ps); err != nil { return errResp(ErrDecode, "msg %v: %v", msg, err) } pm.receiveCh <- &ps case msg.Code == DKGPartialSignatureMsg: // broadcast in DKG set - var psig coreTypes.DKGPartialSignature + var psig dkgTypes.PartialSignature if err := msg.Decode(&psig); err != nil { return errResp(ErrDecode, "msg %v: %v", msg, err) } @@ -896,7 +897,7 @@ func (pm *ProtocolManager) SendDKGPrivateShare( } func (pm *ProtocolManager) BroadcastDKGPrivateShare( - privateShare *coreTypes.DKGPrivateShare) { + privateShare *dkgTypes.PrivateShare) { label := peerLabel{set: dkgset, round: privateShare.Round} for _, peer := range pm.peers.PeersWithLabel(label) { if !peer.knownDKGPrivateShares.Contains(rlpHash(privateShare)) { @@ -906,7 +907,7 @@ func (pm *ProtocolManager) BroadcastDKGPrivateShare( } func (pm *ProtocolManager) BroadcastDKGPartialSignature( - psig *coreTypes.DKGPartialSignature) { + psig *dkgTypes.PartialSignature) { label := peerLabel{set: dkgset, round: psig.Round} for _, peer := range pm.peers.PeersWithLabel(label) { if !peer.knownDKGPartialSignatures.Contains(rlpHash(psig)) { |