From 9ce48d6e895d7c6051d1cef83116800188ec247e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=BA=C3=B1ez?= Date: Sun, 28 Jul 2019 00:55:58 +0200 Subject: [PATCH] Pass --sync flag value to Stakeholder initialization --- nucypher/blockchain/eth/actors.py | 4 ++-- nucypher/cli/stake.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nucypher/blockchain/eth/actors.py b/nucypher/blockchain/eth/actors.py index 5e2830ff9..4dcb22ed2 100644 --- a/nucypher/blockchain/eth/actors.py +++ b/nucypher/blockchain/eth/actors.py @@ -788,14 +788,14 @@ class StakeHolder(BaseConfiguration): return payload @classmethod - def from_configuration_file(cls, filepath: str = None, **overrides) -> 'StakeHolder': + def from_configuration_file(cls, filepath: str = None, sync_now: bool = True, **overrides) -> 'StakeHolder': filepath = filepath or cls.default_filepath() payload = cls._read_configuration_file(filepath=filepath) # Sub config blockchain_payload = payload.pop('blockchain') blockchain = BlockchainInterface.from_dict(payload=blockchain_payload) - blockchain.connect() # TODO: Leave this here? + blockchain.connect(sync_now=sync_now) # TODO: Leave this here? payload.update(dict(blockchain=blockchain)) diff --git a/nucypher/cli/stake.py b/nucypher/cli/stake.py index 2a080aa7a..d35a28081 100644 --- a/nucypher/cli/stake.py +++ b/nucypher/cli/stake.py @@ -118,7 +118,8 @@ def stake(click_config, STAKEHOLDER = StakeHolder.from_configuration_file(filepath=config_file, provider_uri=provider_uri, registry_filepath=registry_filepath, - offline=offline) + offline=offline, + sync_now=sync) # # Eager Actions #