mirror of https://github.com/certusone/dc4bc.git
fix getting commit data in processDealCommits
This commit is contained in:
parent
c0ebb5c004
commit
6e6e6f0452
|
@ -161,7 +161,8 @@ func (d *DKG) processDealCommits(verifier *vss.Verifier, deal *dkg.Deal) (bool,
|
|||
return false, err
|
||||
}
|
||||
|
||||
participant := fmt.Sprintf("participant_%d", deal.Index)
|
||||
participant := d.pubkeys.GetParticipantByIndex(int(deal.Index))
|
||||
|
||||
commitsData, ok := d.commits[participant]
|
||||
|
||||
if !ok {
|
||||
|
@ -200,7 +201,7 @@ func (d *DKG) Reconstruct() error {
|
|||
}
|
||||
|
||||
masterPubKey := share.NewPubPoly(d.suite, nil, distKeyShare.Commitments())
|
||||
fmt.Println(masterPubKey)
|
||||
fmt.Println(d.ParticipantID, masterPubKey)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -33,6 +33,13 @@ func (s PKStore) GetPKs() []kyber.Point {
|
|||
return out
|
||||
}
|
||||
|
||||
func (s PKStore) GetParticipantByIndex(index int) string {
|
||||
if index < 0 || index > len(s) {
|
||||
return ""
|
||||
}
|
||||
return s[index].Participant
|
||||
}
|
||||
|
||||
type messageStore struct {
|
||||
// Common number of messages of the same type from peers
|
||||
messagesCount int
|
||||
|
|
Loading…
Reference in New Issue