fix airgapped test

This commit is contained in:
programmer10110 2020-08-21 19:59:47 +03:00
parent 88fc5c1340
commit 1b047b4ee5
2 changed files with 10 additions and 12 deletions

View File

@ -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)
}

View File

@ -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)
}