prepare: Add backwards compatibility mode for DASH wallets.

testing notes:
gist.github.com/tecnovert/627f67b7d04746f79c3e9e975458139e
This commit is contained in:
tecnovert
2024-10-03 16:28:26 +02:00
parent d097846756
commit 60a3956c07
3 changed files with 50 additions and 0 deletions

View File

@@ -1256,6 +1256,7 @@ def printHelp():
print('--keysdirpath Speed up tests by preloading all PGP keys in directory.')
print('--noreleasesizecheck If unset the size of existing core release files will be compared to their size at their download url.')
print('--redownloadreleases If set core release files will be redownloaded.')
print('--dashv20compatible Generate the same DASH wallet seed as for DASH v20 - Use only when importing an existing seed.')
active_coins = []
for coin_name in known_coins.keys():
@@ -1588,6 +1589,9 @@ def main():
if name == 'initwalletsonly':
initwalletsonly = True
continue
if name == 'dashv20compatible':
extra_opts['dash_v20_compatible'] = True
continue
if len(s) == 2:
if name == 'datadir':
data_dir = os.path.expanduser(s[1].strip('"'))
@@ -1933,6 +1937,9 @@ def main():
chainclients['monero']['walletsdir'] = os.getenv('XMR_WALLETS_DIR', chainclients['monero']['datadir'])
chainclients['wownero']['walletsdir'] = os.getenv('WOW_WALLETS_DIR', chainclients['wownero']['datadir'])
if extra_opts.get('dash_v20_compatible', False):
chainclients['dash']['wallet_v20_compatible'] = True
if initwalletsonly:
logger.info('Initialising wallets')
settings = load_config(config_path)