Fix import statement, and add comment about follow-up PR for treasure map id length.

Co-authored-by: David Núñez <david@nucypher.com>
pull/2664/head
derekpierre 2021-06-17 09:24:18 -04:00
parent 2cdad04528
commit e45124463c
2 changed files with 7 additions and 3 deletions

View File

@ -35,10 +35,14 @@ from nucypher.crypto.utils import keccak_digest
from nucypher.crypto.umbral_adapter import PublicKey, KeyFrag, Signature
from nucypher.crypto.utils import construct_policy_id
from nucypher.network.middleware import RestMiddleware
from nucypher.policy.reservoir import (
make_federated_staker_reservoir,
MergedReservoir,
PrefetchStrategy,
make_decentralized_staker_reservoir
)
from nucypher.utilities.concurrency import WorkerPool, AllAtOnceFactory
from nucypher.utilities.logging import Logger
from .reservoir import make_federated_staker_reservoir, MergedReservoir, PrefetchStrategy, \
make_decentralized_staker_reservoir
class Arrangement:

View File

@ -27,6 +27,6 @@ class TreasureMapID(BaseField, fields.String):
def _validate(self, value):
treasure_map_id = bytes.fromhex(value)
# FIXME federated has map id length 32 bytes but decentralized has length 16 bytes ... huh?
# FIXME federated has map id length 32 bytes but decentralized has length 16 bytes ... huh? - #2725
if len(treasure_map_id) != TreasureMap.ID_LENGTH and len(treasure_map_id) != HRAC_LENGTH:
raise InvalidInputData(f"Could not convert input for {self.name} to a valid TreasureMap ID: invalid length")