preparescript: Fix missing btc wallet with --addcoin=bitcoin and --usebtcfastsync

doc: Fetch latest xmr chain height
This commit is contained in:
tecnovert
2022-06-18 19:28:40 +02:00
parent f787bdb203
commit d2324ad097
7 changed files with 94 additions and 56 deletions

View File

@@ -20,10 +20,13 @@ from xmlrpc.client import (
from .util import jsonDecimal
def waitForRPC(rpc_func, wallet=None, max_tries=7):
def waitForRPC(rpc_func, expect_wallet=True, max_tries=7):
for i in range(max_tries + 1):
try:
rpc_func('getwalletinfo')
if expect_wallet:
rpc_func('getwalletinfo')
else:
rpc_func('getblockchaininfo')
return
except Exception as ex:
if i < max_tries: