Skip to content

Commit 86e7695

Browse files
Minor errors in trogdar release fixed (#376)
* did requested changes * warnings removed * reformatted Co-authored-by: Keith Fung <[email protected]>
1 parent 05e8034 commit 86e7695

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/electionguard/guardian.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
from .schnorr import SchnorrProof
4545
from .tally import CiphertextTally
4646
from .types import BALLOT_ID, GUARDIAN_ID
47-
from .utils import get_optional
4847

4948

5049
@dataclass
@@ -511,9 +510,11 @@ def publish_joint_key(self) -> Optional[ELECTION_JOINT_PUBLIC_KEY]:
511510
)
512511
return elgamal_combine_public_keys(public_keys)
513512

514-
def share_other_guardian_key(self, guardian_id: GUARDIAN_ID) -> ElectionPublicKey:
515-
"""Share other guardians keys shared during key ceremony."""
516-
return get_optional(self._guardian_election_public_keys.get(guardian_id))
513+
def share_other_guardian_key(
514+
self, guardian_id: GUARDIAN_ID
515+
) -> Optional[ElectionPublicKey]:
516+
"""Share other guardians keys shared during key ceremony"""
517+
return self._guardian_election_public_keys.get(guardian_id)
517518

518519
def compute_tally_share(
519520
self, tally: CiphertextTally, context: CiphertextElectionContext

tests/integration/test_end_to_end_election.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060

6161
from electionguardtest.ballot_factory import BallotFactory
6262
from electionguardtest.election_factory import ElectionFactory, NUMBER_OF_GUARDIANS
63-
from electionguardtest.identity_encrypt import identity_auxiliary_encrypt
63+
from electionguardtest.identity_encrypt import (
64+
identity_auxiliary_encrypt,
65+
identity_auxiliary_decrypt,
66+
)
6467

6568
RESULTS_DIR = "test-results"
6669
DEVICES_DIR = path.join(RESULTS_DIR, "devices")
@@ -249,7 +252,7 @@ def step_1_key_ceremony(self) -> None:
249252
if designated_guardian.id is not backup_owner.id:
250253
verification = (
251254
designated_guardian.verify_election_partial_key_backup(
252-
backup_owner.id, identity_auxiliary_encrypt
255+
backup_owner.id, identity_auxiliary_decrypt
253256
)
254257
)
255258
verifications.append(get_optional(verification))

0 commit comments

Comments
 (0)