Skip to content

Commit

Permalink
Merge #1573: Log in case JM loads RPC wallet at startup
Browse files Browse the repository at this point in the history
83d7ebb Log in case JM loads RPC wallet at startup (Kristaps Kaupe)

Pull request description:

  There are some cases when this operation can be slow, better log. Otherwise user might think JM just hanged up.

  In my case I was doing some testing on ARM machine where I don't run JM everyday, so that wallet haven't been used for a long time and Core needed to do rescan for almost 8000 blocks.

ACKs for top commit:
  roshii:
    utACK 83d7ebb

Tree-SHA512: b605e5e9310113caf21f540a62c2604a80dcbc054515f85d747a782a7220153631e3e4593d1c05821f9a8dcb50602355129c2903d85dd15007c12dc8f6dbb4e2
  • Loading branch information
kristapsk committed Oct 8, 2023
2 parents c68ab5a + 83d7ebb commit dbb7001
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jmclient/blockchaininterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ def __init__(self, jsonRpc: JsonRpc, network: str, wallet_name: str) -> None:
# Check that RPC wallet is loaded. If not, try to load it.
loaded_wallets = self._rpc("listwallets", [])
if not wallet_name in loaded_wallets:
log.info("Loading Bitcoin RPC wallet " + wallet_name + "...")
self._rpc("loadwallet", [wallet_name])
log.info("Done.")
# We only support legacy wallets currently
wallet_info = self._getwalletinfo()
if "descriptors" in wallet_info and wallet_info["descriptors"]:
Expand Down

0 comments on commit dbb7001

Please sign in to comment.