diff --git a/jmclient/jmclient/wallet_utils.py b/jmclient/jmclient/wallet_utils.py index 7ca8304..07d00c7 100644 --- a/jmclient/jmclient/wallet_utils.py +++ b/jmclient/jmclient/wallet_utils.py @@ -1432,6 +1432,8 @@ def wallet_tool_main(wallet_root_path): # this object is only to respect the layering, # the service will not be started since this is a synchronous script: wallet_service = WalletService(wallet) + if wallet_service.rpc_error: + sys.exit(EXIT_FAILURE) if method not in noscan_methods and jm_single().bc_interface is not None: # if nothing was configured, we override bitcoind's options so that diff --git a/scripts/add-utxo.py b/scripts/add-utxo.py index f39efc5..426f273 100755 --- a/scripts/add-utxo.py +++ b/scripts/add-utxo.py @@ -172,6 +172,8 @@ def main(): wallet_path = get_wallet_path(options.loadwallet) wallet = open_wallet(wallet_path, gap_limit=options.gaplimit) wallet_service = WalletService(wallet) + if wallet_service.rpc_error: + sys.exit(EXIT_FAILURE) while True: if wallet_service.sync_wallet(fast=not options.recoversync): break diff --git a/scripts/sendpayment.py b/scripts/sendpayment.py index 798f3db..8901ed3 100755 --- a/scripts/sendpayment.py +++ b/scripts/sendpayment.py @@ -170,6 +170,8 @@ def main(): wallet_password_stdin=options.wallet_password_stdin, gap_limit=options.gaplimit) wallet_service = WalletService(wallet) + if wallet_service.rpc_error: + sys.exit(EXIT_FAILURE) # in this script, we need the wallet synced before # logic processing for some paths, so do it now: while not wallet_service.synced: diff --git a/scripts/tumbler.py b/scripts/tumbler.py index 7f050e6..5a918bb 100755 --- a/scripts/tumbler.py +++ b/scripts/tumbler.py @@ -45,6 +45,8 @@ def main(): wallet_path = get_wallet_path(wallet_name, None) wallet = open_test_wallet_maybe(wallet_path, wallet_name, max_mix_depth, wallet_password_stdin=options_org.wallet_password_stdin) wallet_service = WalletService(wallet) + if wallet_service.rpc_error: + sys.exit(EXIT_FAILURE) # in this script, we need the wallet synced before # logic processing for some paths, so do it now: while not wallet_service.synced: