mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-02 20:05:45 +02:00
refactor: replace RegisterWalletRPCCommands with GetWalletRPCCommands
This commit is contained in:
@@ -4263,7 +4263,7 @@ UniValue removeprunedfunds(const JSONRPCRequest& request);
|
||||
UniValue importmulti(const JSONRPCRequest& request);
|
||||
UniValue importdescriptors(const JSONRPCRequest& request);
|
||||
|
||||
void RegisterWalletRPCCommands(interfaces::Chain& chain, std::vector<std::unique_ptr<interfaces::Handler>>& handlers)
|
||||
Span<const CRPCCommand> GetWalletRPCCommands()
|
||||
{
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
@@ -4329,9 +4329,7 @@ static const CRPCCommand commands[] =
|
||||
{ "wallet", "walletprocesspsbt", &walletprocesspsbt, {"psbt","sign","sighashtype","bip32derivs"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
handlers.emplace_back(chain.handleRpc(commands[vcidx]));
|
||||
return MakeSpan(commands);
|
||||
}
|
||||
|
||||
interfaces::Chain* g_rpc_chain = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user