HomePhabricator

wallet: Make RPC help compile-time static

Description

wallet: Make RPC help compile-time static

Summary:

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.

This is a backport of core#19250 [1/2]
https://github.com/bitcoin/bitcoin/pull/19250/commits/fad889cbf0b6c46da2e110b73cbea55e4ff7951e

Depends on D9452

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9455

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jun 11 2020, 14:23
PiRKCommitted on Apr 29 2021, 11:55
PiRKPushed on Apr 29 2021, 11:55
Reviewer
Restricted Project
Differential Revision
D9455: wallet: Make RPC help compile-time static
Parents
rABC51c94b782d08: refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable…
Branches
Unknown
Tags
Unknown