From 073a017016e62c7d52562aa61d942024379c110d Mon Sep 17 00:00:00 2001 From: rkrux Date: Mon, 24 Feb 2025 15:44:39 +0530 Subject: [PATCH] test: add coverage for abandoning unconfirmed transaction Co-authored-by: Eunovo --- test/functional/wallet_abandonconflict.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py index ce0f4d099b5..2bbfaee3db1 100755 --- a/test/functional/wallet_abandonconflict.py +++ b/test/functional/wallet_abandonconflict.py @@ -45,6 +45,10 @@ def run_test(self): txB = alice.sendtoaddress(alice.getnewaddress(), Decimal("10")) txC = alice.sendtoaddress(alice.getnewaddress(), Decimal("10")) self.sync_mempools() + + # Can not abandon transaction in mempool + assert_raises_rpc_error(-5, 'Transaction not eligible for abandonment', lambda: alice.abandontransaction(txid=txA)) + self.generate(self.nodes[1], 1) # Can not abandon non-wallet transaction