aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-25 11:17:52 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:17 +0800
commitdcb706ee7a9a497527dff649d8cf7d37a1d8fb2d (patch)
tree2f186f3a17f5c0241b3e21a07101f18f76ca70f8 /dex/handler.go
parentf80216879307f6fa21b5937e3644e417226d9467 (diff)
downloadgo-tangerine-dcb706ee7a9a497527dff649d8cf7d37a1d8fb2d.tar.gz
go-tangerine-dcb706ee7a9a497527dff649d8cf7d37a1d8fb2d.tar.zst
go-tangerine-dcb706ee7a9a497527dff649d8cf7d37a1d8fb2d.zip
vendor: sync consensus core and fix conflict
Diffstat (limited to 'dex/handler.go')
-rw-r--r--dex/handler.go9
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)) {