diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-12 13:04:31 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-12 13:04:37 -0400 |
commit | 19e919217e6d62e3640525e4149de1a4ae04e74f (patch) | |
tree | 705baa9d76770297beab885246909f3ec2ec6c41 /test | |
parent | b33136b6ba9887f7db651c4c5264ca7f2f601df7 (diff) | |
parent | fadf6bd04f002d05aaff8eba74015e25a41966bc (diff) |
Merge #19250: wallet: Make RPC help compile-time static
fadf6bd04f002d05aaff8eba74015e25a41966bc refactor: Remove unused request.fHelp (MarcoFalke)
fad889cbf0b6c46da2e110b73cbea55e4ff7951e wallet: Make RPC help compile-time static (MarcoFalke)
Pull request description:
Currently calling `help` on a wallet RPC method will either return `help: unknown command: getnewaddress` or the actual help. This runtime dependency of the help is a bug that complicates any tool that relies on documentation. Also, the code that enables the bug is overly complicated and confusing.
The fix is split into two commits:
* First, a commit that can be reviewed with the `--color-moved=dimmed-zebra` option and tested with the included test.
* Second, a commit that removes the complicated and confusing code.
ACKs for top commit:
achow101:
re-ACK fadf6bd04f002d05aaff8eba74015e25a41966bc
promag:
Tested ACK fadf6bd04f002d05aaff8eba74015e25a41966bc.
Tree-SHA512: 65d4ff400467f57cb8415c30ce30f814dc76c5c157308b7a7409c59ac9db629e65dfba31cd9c389cfe60a008d3d87787ea0a0e0f2671fd65fd190543c915493d
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/rpc_help.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py index 027ae368e7..9b981b864e 100755 --- a/test/functional/rpc_help.py +++ b/test/functional/rpc_help.py @@ -18,6 +18,8 @@ class HelpRpcTest(BitcoinTestFramework): def run_test(self): self.test_categories() self.dump_help() + if self.is_wallet_compiled(): + self.wallet_help() def test_categories(self): node = self.nodes[0] @@ -53,6 +55,11 @@ class HelpRpcTest(BitcoinTestFramework): # Make sure the node can generate the help at runtime without crashing f.write(self.nodes[0].help(call)) + def wallet_help(self): + assert 'getnewaddress ( "label" "address_type" )' in self.nodes[0].help('getnewaddress') + self.restart_node(0, extra_args=['-nowallet=1']) + assert 'getnewaddress ( "label" "address_type" )' in self.nodes[0].help('getnewaddress') + if __name__ == '__main__': HelpRpcTest().main() |