Merge pull request #1719 from KPrasch/keep-master-passing

Keep master passing
pull/1724/head
Justin Holmes 2020-02-20 10:01:52 -07:00 committed by GitHub
commit 03c8fe55ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -827,10 +827,11 @@ class BlockchainInterfaceFactory:
interface: BlockchainInterface,
sync: bool = False,
emitter=None,
force: bool = False,
) -> None:
provider_uri = interface.provider_uri
if provider_uri in cls._interfaces:
if (provider_uri in cls._interfaces) and not force:
raise cls.InterfaceAlreadyInitialized(f"A connection already exists for {provider_uri}. "
"Use .get_interface instead.")
cached = cls.CachedInterface(interface=interface, sync=sync, emitter=emitter)

View File

@ -91,7 +91,8 @@ def _initialize_blockchain(poa, provider_uri, emitter, ignore_solidity_check):
deployer_interface = BlockchainDeployerInterface(provider_uri=provider_uri,
poa=poa,
ignore_solidity_check=ignore_solidity_check)
BlockchainInterfaceFactory.register_interface(interface=deployer_interface, sync=False,
BlockchainInterfaceFactory.register_interface(interface=deployer_interface,
sync=False,
emitter=emitter)
else:
deployer_interface = BlockchainInterfaceFactory.get_interface(provider_uri=provider_uri)

View File

@ -161,8 +161,8 @@ def test_bob_retrieves_twice_via_cli(click_runner,
'--config-file', bob_configuration_file_location,
'--message-kit', message_kit_b64_bytes,
'--label', label,
'--policy-encrypting-key', federated_alice.get_policy_encrypting_key_from_label(label).hex(),
'--alice-verifying-key', federated_alice.public_keys(SigningPower).hex()
'--policy-encrypting-key', bytes(federated_alice.get_policy_encrypting_key_from_label(label)).hex(),
'--alice-verifying-key', bytes(federated_alice.public_keys(SigningPower)).hex()
)
from nucypher.cli import actions
@ -178,7 +178,6 @@ def test_bob_retrieves_twice_via_cli(click_runner,
this_fuckin_guy.controller.emitter = JSONRPCStdoutEmitter()
return this_fuckin_guy
_old_make_character_function = actions.make_cli_character
try:

View File

@ -454,7 +454,8 @@ def _make_testerchain():
# Create the blockchain
testerchain = TesterBlockchain(eth_airdrop=True, free_transactions=True)
BlockchainInterfaceFactory.register_interface(interface=testerchain)
BlockchainInterfaceFactory.register_interface(interface=testerchain, force=True)
# Mock TransactingPower Consumption (Deployer)
testerchain.transacting_power = TransactingPower(password=INSECURE_DEVELOPMENT_PASSWORD,