|
2 | 2 | import shutil |
3 | 3 |
|
4 | 4 | from argparse import Namespace, ArgumentParser |
5 | | -from typing import List, Tuple, Dict, Optional, Any |
| 5 | +from typing import List, Tuple, Dict, Any |
6 | 6 | from blspy import ExtendedPrivateKey |
7 | 7 | from src.types.BLSSignature import BLSPublicKey |
8 | 8 | from src.consensus.coinbase import create_puzzlehash_for_pk |
@@ -31,9 +31,12 @@ def dict_add_new_default( |
31 | 31 | ): |
32 | 32 | for k, v in default.items(): |
33 | 33 | if isinstance(v, dict) and k in updated: |
| 34 | + # If there is an intermediate key with empty string value, do not migrate all decendants |
| 35 | + if do_not_migrate_keys.get(k, None) == "": |
| 36 | + do_not_migrate_keys[k] = v |
34 | 37 | dict_add_new_default(updated[k], default[k], do_not_migrate_keys.get(k, {})) |
35 | 38 | elif k not in updated or k in do_not_migrate_keys: |
36 | | - updated[k] = default[k] |
| 39 | + updated[k] = v |
37 | 40 |
|
38 | 41 |
|
39 | 42 | def migrate_from( |
@@ -149,8 +152,8 @@ def chia_init(args: Namespace): |
149 | 152 |
|
150 | 153 | # These are the config keys that will not be migrated, and instead the default is used |
151 | 154 | DO_NOT_MIGRATE_KEYS: List[str] = [ |
152 | | - "full_node.introducer_peer.host", |
153 | | - "wallet.introducer_peer.host", |
| 155 | + "full_node.introducer_peer", |
| 156 | + "wallet.introducer_peer", |
154 | 157 | ] |
155 | 158 |
|
156 | 159 | # These are the files that will be migrated |
|
0 commit comments