Skip to content

Commit

Permalink
Merge pull request #72 from JohnLCaron/decryptBallots
Browse files Browse the repository at this point in the history
RunDecryptBallots doesnt need the encrypted tally.
  • Loading branch information
JohnLCaron authored Apr 27, 2024
2 parents 4b3d8ce + 9baa56e commit 095a4ba
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ class RunTrustedBallotDecryption {
val stopwatch = Stopwatch() // start timing here

val consumerIn = makeConsumer(inputDir)
val result: Result<TallyResult, ErrorMessages> = consumerIn.readTallyResult()
val result: Result<ElectionInitialized, ErrorMessages> = consumerIn.readElectionInitialized()
if (result is Err) {
logger.error { result.error.toString() }
return Pair(1,0)
}
val tallyResult = result.unwrap()
val guardians = Guardians(consumerIn.group, tallyResult.electionInitialized.guardians)
val electionInitialized = result.unwrap()
val guardians = Guardians(consumerIn.group, electionInitialized.guardians)

val decryptor = BallotDecryptor(
consumerIn.group,
tallyResult.electionInitialized.extendedBaseHash,
tallyResult.electionInitialized.jointPublicKey,
electionInitialized.extendedBaseHash,
electionInitialized.jointPublicKey,
guardians,
decryptingTrustees,
)
Expand Down

0 comments on commit 095a4ba

Please sign in to comment.