You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable functions
This simplifies control flow and also helps get rid of the ::vpwallets
variable, because EnsureWalletIsAvailable doesn't have access to the request
context.
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
331
-
return NullUniValue;
332
-
}
333
325
334
326
RPCHelpMan{"importprunedfunds",
335
327
"\nImports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.\n",
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
389
-
return NullUniValue;
390
-
}
391
381
392
382
RPCHelpMan{"removeprunedfunds",
393
383
"\nDeletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.\n",
if (!EnsureWalletIsAvailable(pwallet, mainRequest.fHelp)) {
1265
-
return NullUniValue;
1266
-
}
1267
1247
1268
1248
RPCHelpMan{"importmulti",
1269
1249
"\nImport addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.\n"
if (!EnsureWalletIsAvailable(pwallet, main_request.fHelp)) {
1593
-
return NullUniValue;
1594
-
}
1595
1573
1596
1574
RPCHelpMan{"importdescriptors",
1597
1575
"\nImport descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.\n"
0 commit comments