From 7824f6b07703463707bb4f10577ff6d34118e248 Mon Sep 17 00:00:00 2001 From: tdb3 <106488469+tdb3@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:11:49 -0400 Subject: [PATCH] test: check that getorphantxs is hidden --- test/functional/rpc_getorphantxs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/functional/rpc_getorphantxs.py b/test/functional/rpc_getorphantxs.py index 1e08f15065f..b905d54954e 100755 --- a/test/functional/rpc_getorphantxs.py +++ b/test/functional/rpc_getorphantxs.py @@ -23,6 +23,7 @@ class GetOrphanTxsTest(BitcoinTestFramework): self.wallet = MiniWallet(self.nodes[0]) self.test_orphan_activity() self.test_orphan_details() + self.test_misc() def test_orphan_activity(self): self.log.info("Check that orphaned transactions are returned with getorphantxs") @@ -128,5 +129,13 @@ class GetOrphanTxsTest(BitcoinTestFramework): self.log.info("Check the transaction hex of orphan") assert_equal(orphan["hex"], tx["hex"]) + def test_misc(self): + node = self.nodes[0] + help_output = node.help() + self.log.info("Check that getorphantxs is a hidden RPC") + assert "getorphantxs" not in help_output + assert "unknown command: getorphantxs" not in node.help("getorphantxs") + + if __name__ == '__main__': GetOrphanTxsTest(__file__).main()