diff --git a/jmclient/jmclient/wallet_service.py b/jmclient/jmclient/wallet_service.py index f16d4458a..1ad71e069 100644 --- a/jmclient/jmclient/wallet_service.py +++ b/jmclient/jmclient/wallet_service.py @@ -808,10 +808,15 @@ def sync_unspent(self): # block height needs to be real time for addition to our utxos. # We are a little aggressive in trying this RPC call, because if # it fails we cannot continue: - for _ in range(5): + for i in range(5): current_blockheight = self.bci.get_current_block_height() if current_blockheight: break + if i < 4: + jlog.debug("Error calling blockheight RPC, trying again in 0.5s.") + # sync unspent calls are synchronous; this short sleep should + # not affect us since we are not yet in main monitor loop. + time.sleep(0.5) if not current_blockheight: # this failure is critical; give up: jlog.error("Failed to access the current blockheight, "