From d91686c5e100bd05241f12e0f539d8a2a25307d1 Mon Sep 17 00:00:00 2001 From: Justin Holmes Date: Mon, 26 Jun 2023 11:13:54 +0200 Subject: [PATCH] Yeah, why are we still using lambdas for this sort of thing? Co-authored-by: Owen Campbell --- nucypher/characters/chaotic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nucypher/characters/chaotic.py b/nucypher/characters/chaotic.py index 54427c10c..f9823af06 100644 --- a/nucypher/characters/chaotic.py +++ b/nucypher/characters/chaotic.py @@ -1,4 +1,5 @@ import json +from operator import attrgetter from typing import Dict, Tuple from ferveo_py import DkgPublicParameters @@ -97,7 +98,7 @@ class DKGOmniscient: ] # Validators must be sorted by their public key - validators.sort(key=lambda v: v.address) + validators.sort(key=attrgetter("address")) # Each validator holds their own DKG instance and generates a transcript every # validator, including themselves