diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-10-25 09:55:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 09:55:59 +0800 |
commit | 9839a1c6fecbada7d1736680930c3e527f984470 (patch) | |
tree | 400c69e60c132dd5101f125eda7114e4bb098b45 /core/consensus_test.go | |
parent | 14b91441825d6b990527e947c021a5311e951c25 (diff) | |
download | dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar.gz dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar.bz2 dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar.lz dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar.xz dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.tar.zst dexon-consensus-9839a1c6fecbada7d1736680930c3e527f984470.zip |
core: Move dkg in types to types/dkg. (#253)
Diffstat (limited to 'core/consensus_test.go')
-rw-r--r-- | core/consensus_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/consensus_test.go b/core/consensus_test.go index 7a2e315..ed98b76 100644 --- a/core/consensus_test.go +++ b/core/consensus_test.go @@ -27,6 +27,7 @@ import ( "github.com/dexon-foundation/dexon-consensus-core/core/crypto" "github.com/dexon-foundation/dexon-consensus-core/core/test" "github.com/dexon-foundation/dexon-consensus-core/core/types" + typesDKG "github.com/dexon-foundation/dexon-consensus-core/core/types/dkg" "github.com/stretchr/testify/suite" ) @@ -60,20 +61,20 @@ func (n *network) BroadcastRandomnessResult( // SendDKGPrivateShare sends PrivateShare to a DKG participant. func (n *network) SendDKGPrivateShare( - recv crypto.PublicKey, prvShare *types.DKGPrivateShare) { + recv crypto.PublicKey, prvShare *typesDKG.PrivateShare) { n.conn.send(types.NewNodeID(recv), prvShare) } // BroadcastDKGPrivateShare broadcasts PrivateShare to all DKG participants. func (n *network) BroadcastDKGPrivateShare( - prvShare *types.DKGPrivateShare) { + prvShare *typesDKG.PrivateShare) { n.conn.broadcast(n.nID, prvShare) } // BroadcastDKGPartialSignature broadcasts partialSignature to all // DKG participants. func (n *network) BroadcastDKGPartialSignature( - psig *types.DKGPartialSignature) { + psig *typesDKG.PartialSignature) { n.conn.broadcast(n.nID, psig) } @@ -109,9 +110,9 @@ func (nc *networkConnection) send(to types.NodeID, msg interface{}) { err = con.ProcessAgreementResult(val) case *types.BlockRandomnessResult: err = con.ProcessBlockRandomnessResult(val) - case *types.DKGPrivateShare: + case *typesDKG.PrivateShare: err = con.cfgModule.processPrivateShare(val) - case *types.DKGPartialSignature: + case *typesDKG.PartialSignature: err = con.cfgModule.processPartialSignature(val) } if err != nil { |