mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-13 00:54:53 +01:00
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:
@@ -71,7 +71,9 @@ class IPCInterfaceTest(BitcoinTestFramework):
|
|||||||
def run_deprecated_mining_test(self):
|
def run_deprecated_mining_test(self):
|
||||||
self.log.info("Running deprecated mining interface test")
|
self.log.info("Running deprecated mining interface test")
|
||||||
async def async_routine():
|
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")
|
self.log.debug("Calling deprecated makeMiningOld2 should raise an error")
|
||||||
try:
|
try:
|
||||||
await init.makeMiningOld2()
|
await init.makeMiningOld2()
|
||||||
|
|||||||
Reference in New Issue
Block a user