mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-07-23 22:58:59 +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:
@@ -135,6 +135,9 @@ class ProxyTest(BitcoinTestFramework):
|
||||
if self.have_unix_sockets:
|
||||
args[5] = ['-listen', f'-proxy=unix:{socket_path}']
|
||||
args[6] = ['-listen', f'-onion=unix:{socket_path}']
|
||||
# This test launches many nodes; disable prevout prefetching so we don't spin up a
|
||||
# thread pool for each one.
|
||||
args = [a + ['-prevoutfetchthreads=0'] for a in args]
|
||||
self.add_nodes(self.num_nodes, extra_args=args)
|
||||
self.start_nodes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user