mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
coins: introduce thread pool in CoinsViewOverlay
Introduce a ThreadPool shared pointer to CoinsViewOverlay. A pool managed externally can be passed in the constructor. A global thread pool is used in fuzz harnesses since iterations can happen faster than the OS can create and tear down thread pools. This can cause a memory leak when fuzzing. Co-authored-by: l0rinc <pap.lorinc@gmail.com>
This commit is contained in:
@@ -566,6 +566,8 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
|
||||
# nMaxConnections = available_fds - min_required_fds = 256 - 161 = 94;
|
||||
f.write("maxconnections=94\n")
|
||||
f.write("par=" + str(min(2, os.cpu_count())) + "\n")
|
||||
# Use a single prevoutfetch worker thread to keep per-node resource usage low.
|
||||
f.write("prevoutfetchthreads=1\n")
|
||||
f.write(extra_config)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user