From 17cec39089da7a2edf43c52343cedbc56fa1c6ec Mon Sep 17 00:00:00 2001 From: David Florness Date: Sun, 16 May 2021 13:13:04 -0400 Subject: [PATCH] Use cached list of hash seeds --- election/msg.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/election/msg.go b/election/msg.go index 0491dbb..5798f0d 100644 --- a/election/msg.go +++ b/election/msg.go @@ -820,13 +820,11 @@ func (elections *ElectionsMap) onSumMessage(evt *event.Event) (success bool) { var publicCircuit math.SumCircuit n := len(*el.FinalJoinIDs) - hashSeeds := make([]string, n) hashSelects := make([]frontend.Variable, n) outputHashes := make([]frontend.Variable, n) voterJoinIDIndex := *voter.JoinIDIndex for i, joinID := range *el.FinalJoinIDs { evaler := el.Joins[joinID] - hashSeeds[i] = evaler.HashSeed if uint(i) == voterJoinIDIndex { hashSelects[i].Assign(1) } else { @@ -834,7 +832,7 @@ func (elections *ElectionsMap) onSumMessage(evt *event.Event) (success bool) { } outputHashes[i].Assign((*evaler.OutputHashes)[voterJoinIDIndex]) } - publicCircuit.HashSeeds = hashSeeds + publicCircuit.HashSeeds = el.GetHashSeeds() publicCircuit.HashSelects = hashSelects publicCircuit.OutputHashes = outputHashes publicCircuit.Sum.Assign(sum) -- 2.38.4