test: avoid interface_ipc.py race and null pointer dereference

Avoid race condition in run_deprecated_mining_test caused by creating and
immediately destroying an unused worker thread. This leads to test failures
reported by maflcko in #34711
This commit is contained in:
Ryan Ofsky 2026-03-02 14:22:05 -05:00
parent 9cad97f6cd
commit 1c1de334e9

View File

@ -71,7 +71,9 @@ class IPCInterfaceTest(BitcoinTestFramework):
def run_deprecated_mining_test(self):
self.log.info("Running deprecated mining interface test")
async def async_routine():
ctx, init = await make_capnp_init_ctx(self)
node = self.nodes[0]
connection = await capnp.AsyncIoStream.create_unix_connection(node.ipc_socket_path)
init = capnp.TwoPartyClient(connection).bootstrap().cast_as(self.capnp_modules['init'].Init)
self.log.debug("Calling deprecated makeMiningOld2 should raise an error")
try:
await init.makeMiningOld2()