From 075d396069793e01b26d92e39123e06818c458f1 Mon Sep 17 00:00:00 2001 From: Kieran Prasch Date: Wed, 17 Jul 2019 16:46:10 -0700 Subject: [PATCH] Sets Ursula filename modifier to be the worker address instead of the staker address. --- nucypher/config/characters.py | 4 ++++ nucypher/config/node.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nucypher/config/characters.py b/nucypher/config/characters.py index ce9461f6a..2d6aadc4b 100644 --- a/nucypher/config/characters.py +++ b/nucypher/config/characters.py @@ -75,6 +75,10 @@ class UrsulaConfiguration(CharacterConfiguration): base_filepaths.update(filepaths) return base_filepaths + def generate_filepath(self, modifier: str = None, *args, **kwargs) -> str: + filepath = super().generate_filepath(modifier=modifier or self.worker_address, *args, **kwargs) + return filepath + def static_payload(self) -> dict: payload = dict( worker_address=self.worker_address, diff --git a/nucypher/config/node.py b/nucypher/config/node.py index 88ea4ab65..53d27eb88 100644 --- a/nucypher/config/node.py +++ b/nucypher/config/node.py @@ -168,7 +168,7 @@ class CharacterConfiguration(BaseConfiguration): """Shortcut: Hook-up a new initial installation and write configuration file to the disk""" node_config = cls(dev_mode=False, *args, **kwargs) node_config.initialize(password=password) - node_config.to_configuration_file(modifier=node_config.checksum_address) + node_config.to_configuration_file() return node_config def cleanup(self) -> None: