Revive #18827
This PR implements a new RPC,
getrpcwhitelist
, that returns whitelisted methods for the calling user.Example:
0./src/bitcoin-cli -regtest getrpcwhitelist 1{ 2 "methods": [ 3 "getbalance", 4 "getrpcwhitelist", 5 "getwalletinfo" 6 ] 7}
A new functional test,
rpc_getrpcwhitelist
, and arelease-notes
entry are included.Fixes #18822
Uses a JSON Object for methods for future extensions.
Not clear what it should do for users that don’t have a whitelist (ie, can access all methods). Currently errors I think.