mirror of https://github.com/certusone/dc4bc.git
Merge branch 'feat/airgapped-client-tests' of github.com:p2p-org/dc4bc into feat/airgapped-client-tests
This commit is contained in:
commit
197c60b8c5
|
@ -130,13 +130,13 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
//})
|
||||
|
||||
// get commits
|
||||
var getCommitsRequest responses.SignatureProposalParticipantStatusResponse
|
||||
var getCommitsRequest responses.DKGProposalPubKeysParticipantResponse
|
||||
for _, n := range tr.nodes {
|
||||
pubKey, err := n.Machine.pubKey.MarshalBinary()
|
||||
if err != nil {
|
||||
t.Fatalf("%s: failed to marshal pubkey: %v", n.Participant, err)
|
||||
}
|
||||
entry := &responses.SignatureProposalParticipantStatusEntry{
|
||||
entry := &responses.DKGProposalPubKeysParticipantEntry{
|
||||
ParticipantId: n.ParticipantID,
|
||||
Addr: n.Participant,
|
||||
DkgPubKey: pubKey,
|
||||
|
@ -164,8 +164,8 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.commits {
|
||||
p := responses.DKGProposalCommitParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Title: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Commit: req.Commit,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgCommit: req.Commit,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
}
|
||||
|
@ -188,8 +188,8 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.deals {
|
||||
p := responses.DKGProposalDealParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Title: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Deal: req.Deal,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgDeal: req.Deal,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
}
|
||||
|
@ -208,12 +208,12 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
runStep(tr, func(n *Node, wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
|
||||
var payload responses.DKGProposalResponsesParticipantResponse
|
||||
var payload responses.DKGProposalResponseParticipantResponse
|
||||
for _, req := range n.responses {
|
||||
p := responses.DKGProposalResponsesParticipantEntry{
|
||||
p := responses.DKGProposalResponseParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Title: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Responses: req.Response,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgResponse: req.Response,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"go.dedis.ch/kyber/v3"
|
||||
"go.dedis.ch/kyber/v3/pairing/bn256"
|
||||
dkgPedersen "go.dedis.ch/kyber/v3/share/dkg/pedersen"
|
||||
"log"
|
||||
)
|
||||
|
||||
func (am *AirgappedMachine) handleStateAwaitParticipantsConfirmations(o *client.Operation) error {
|
||||
|
@ -72,7 +71,6 @@ func (am *AirgappedMachine) handleStateDkgCommitsAwaitConfirmations(o *client.Op
|
|||
|
||||
dkgInstance, ok := am.dkgInstances[o.DKGIdentifier]
|
||||
if !ok {
|
||||
log.Printf("dkg instance for dkg round %s does not exist, create new\n", o.DKGIdentifier)
|
||||
dkgInstance = dkg.Init(am.suite, am.pubKey, am.secKey)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue