Some changes to alicia to account for changes on master.

pull/618/head
jMyles 2018-12-15 15:00:30 -05:00 committed by Kieran Prasch
parent 9ba2d0950d
commit 1de63a2068
1 changed files with 5 additions and 6 deletions

View File

@ -1,9 +1,9 @@
from nucypher.characters.lawful import Bob, Ursula from nucypher.characters.lawful import Bob, Ursula
from nucypher.config.characters import AliceConfiguration from nucypher.config.characters import AliceConfiguration
from nucypher.config.storages import LocalFileBasedNodeStorage from nucypher.config.storages import LocalFileBasedNodeStorage
from nucypher.crypto.powers import EncryptingPower, SigningPower from nucypher.crypto.powers import DecryptingPower, SigningPower
from nucypher.network.middleware import RestMiddleware from nucypher.network.middleware import RestMiddleware
from nucypher.utilities.logging import simpleObserver from nucypher.utilities.logging import SimpleObserver
import datetime import datetime
import os import os
@ -21,7 +21,7 @@ POLICY_FILENAME = "policy-metadata.json"
###################### ######################
# #
# # Twisted Logger # # Twisted Logger
globalLogPublisher.addObserver(simpleObserver) globalLogPublisher.addObserver(SimpleObserver())
# #
# # Temporary file storage # # Temporary file storage
TEMP_ALICE_DIR = "{}/alicia-files".format(os.path.dirname(os.path.abspath(__file__))) TEMP_ALICE_DIR = "{}/alicia-files".format(os.path.dirname(os.path.abspath(__file__)))
@ -53,8 +53,7 @@ except: # If anything fails, let's create Alicia from scratch
os.mkdir(TEMP_ALICE_DIR) os.mkdir(TEMP_ALICE_DIR)
os.mkdir(TEMP_URSULA_CERTIFICATE_DIR) os.mkdir(TEMP_URSULA_CERTIFICATE_DIR)
ursula = Ursula.from_seed_and_stake_info(host=SEEDNODE_URL, ursula = Ursula.from_seed_and_stake_info(seed_uri=SEEDNODE_URL,
certificates_directory=TEMP_URSULA_CERTIFICATE_DIR,
federated_only=True, federated_only=True,
minimum_stake=0) minimum_stake=0)
@ -63,7 +62,7 @@ except: # If anything fails, let's create Alicia from scratch
node_storage = LocalFileBasedNodeStorage( node_storage = LocalFileBasedNodeStorage(
federated_only=True, federated_only=True,
character_class=Ursula, # Alice needs to store some info about Ursula character_class=Ursula, # Alice needs to store some info about Ursula
known_metadata_dir=os.path.join(TEMP_ALICE_DIR, "known_metadata"), metadata_dir=os.path.join(TEMP_ALICE_DIR, "known_metadata"),
) )
alice_config = AliceConfiguration( alice_config = AliceConfiguration(