Skip to content

Commit 8232d63

Browse files
committed
Allow parent paths to not migrate, and reduce harvester max workers
1 parent 62f1cc2 commit 8232d63

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/cmds/init.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import shutil
33

44
from argparse import Namespace, ArgumentParser
5-
from typing import List, Tuple, Dict, Optional, Any
5+
from typing import List, Tuple, Dict, Any
66
from blspy import ExtendedPrivateKey
77
from src.types.BLSSignature import BLSPublicKey
88
from src.consensus.coinbase import create_puzzlehash_for_pk
@@ -31,9 +31,12 @@ def dict_add_new_default(
3131
):
3232
for k, v in default.items():
3333
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
3437
dict_add_new_default(updated[k], default[k], do_not_migrate_keys.get(k, {}))
3538
elif k not in updated or k in do_not_migrate_keys:
36-
updated[k] = default[k]
39+
updated[k] = v
3740

3841

3942
def migrate_from(
@@ -149,8 +152,8 @@ def chia_init(args: Namespace):
149152

150153
# These are the config keys that will not be migrated, and instead the default is used
151154
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",
154157
]
155158

156159
# These are the files that will be migrated

src/harvester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async def new_challenge(self, new_challenge: harvester_protocol.NewChallenge):
161161
)
162162

163163
loop = asyncio.get_running_loop()
164-
executor = concurrent.futures.ThreadPoolExecutor(max_workers=50)
164+
executor = concurrent.futures.ThreadPoolExecutor(max_workers=5)
165165

166166
def blocking_lookup(filename: Path, prover: DiskProver) -> Optional[List]:
167167
# Uses the DiskProver object to lookup qualities. This is a blocking call,

0 commit comments

Comments
 (0)