From 7093882f47575b1768fddb7452bfc269b89f2991 Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Fri, 26 May 2023 15:50:33 -0400 Subject: [PATCH] Properly patches sendrawtransaction so it does not crash Currently, when mocking sendrawtransaction so it does nothing, the client will raise an exception given the picked lambda does not accept any params (and sendrawtransaction has some). Patches it so this does not happen. This patch is pretty minimal, given the behavior wrt CLN does not change, but it feels better not to except here. --- watchtower-plugin/tests/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watchtower-plugin/tests/test.py b/watchtower-plugin/tests/test.py index 19d633d..2066d1b 100644 --- a/watchtower-plugin/tests/test.py +++ b/watchtower-plugin/tests/test.py @@ -48,7 +48,7 @@ def test_watchtower(node_factory, bitcoind, teosd): locator = change_endianness(dispute_txid[32:]) # Make sure l2's normal penalty_tx doesn't reach the network - l2.daemon.rpcproxy.mock_rpc("sendrawtransaction", lambda: None) + l2.daemon.rpcproxy.mock_rpc("sendrawtransaction", lambda _: {"result": None, "error": None, "id": "pytest"}) l2.start() # The tower will react once the dispute gets confirmed. For now it is still watching for it