mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-14 09:37:59 +02:00
scripted-diff: rpc: Don't pointlessly capture in RPCMethod lambdas
-BEGIN VERIFY SCRIPT- sed -i 's/\[[&]\][(]const RPCMethod[&]/[](const RPCMethod\&/' $(git grep -l '\[\&\](const RPCMethod') -END VERIFY SCRIPT-
This commit is contained in:
@@ -47,7 +47,7 @@ RPCMethod importprunedfunds()
|
||||
},
|
||||
RPCResult{RPCResult::Type::NONE, "", ""},
|
||||
RPCExamples{""},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
@@ -105,7 +105,7 @@ RPCMethod removeprunedfunds()
|
||||
"\nAs a JSON-RPC call\n"
|
||||
+ HelpExampleRpc("removeprunedfunds", "\"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
@@ -353,7 +353,7 @@ RPCMethod importdescriptors()
|
||||
"{ \"desc\": \"<my descriptor 2>\", \"label\": \"example 2\", \"timestamp\": 1455191480 }]'") +
|
||||
HelpExampleCli("importdescriptors", "'[{ \"desc\": \"<my descriptor>\", \"timestamp\":1455191478, \"active\": true, \"range\": [0,100], \"label\": \"<my bech32 wallet>\" }]'")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& main_request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& main_request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(main_request);
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
@@ -491,7 +491,7 @@ RPCMethod listdescriptors()
|
||||
HelpExampleCli("listdescriptors", "") + HelpExampleRpc("listdescriptors", "")
|
||||
+ HelpExampleCli("listdescriptors", "true") + HelpExampleRpc("listdescriptors", "true")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
const std::shared_ptr<const CWallet> wallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!wallet) return UniValue::VNULL;
|
||||
@@ -584,7 +584,7 @@ RPCMethod backupwallet()
|
||||
HelpExampleCli("backupwallet", "\"backup.dat\"")
|
||||
+ HelpExampleRpc("backupwallet", "\"backup.dat\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
@@ -634,7 +634,7 @@ RPCMethod restorewallet()
|
||||
+ HelpExampleCliNamed("restorewallet", {{"wallet_name", "testwallet"}, {"backup_file", "home\\backups\\backup-file.bak\""}, {"load_on_startup", true}})
|
||||
+ HelpExampleRpcNamed("restorewallet", {{"wallet_name", "testwallet"}, {"backup_file", "home\\backups\\backup-file.bak\""}, {"load_on_startup", true}})
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
|
||||
WalletContext& context = EnsureWalletContext(request.context);
|
||||
|
||||
Reference in New Issue
Block a user