From 3de7ffb52d115f6ab9e1d95343eb77f7bc5e4f7f Mon Sep 17 00:00:00 2001 From: jMyles Date: Mon, 12 Jun 2023 20:15:19 +0200 Subject: [PATCH] Overriding variant is a fairly unusual situation - let's bind a default value to the class and let the user subclass if they need to do this. --- nucypher/characters/lawful.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nucypher/characters/lawful.py b/nucypher/characters/lawful.py index 1da8be5fc..98fd07845 100644 --- a/nucypher/characters/lawful.py +++ b/nucypher/characters/lawful.py @@ -1467,6 +1467,7 @@ class Enrico: """A data source that encrypts data for some policy's public key""" banner = ENRICO_BANNER + default_dkg_variant = FerveoVariant.PRECOMPUTED def __init__(self, encrypting_key: Union[PublicKey, DkgPublicKey]): self.signing_power = SigningPower() @@ -1507,7 +1508,7 @@ class Enrico: ciphertext=ciphertext, conditions=Conditions(json.dumps(conditions)), context=context, - variant=variant_id, + variant=variant, ) return ciphertext, tdr