mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-13 00:57:24 +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:
@@ -279,7 +279,7 @@ static RPCMethod getrawtransaction()
|
||||
+ HelpExampleCli("getrawtransaction", "\"mytxid\" 1 \"myblockhash\"")
|
||||
+ HelpExampleCli("getrawtransaction", "\"mytxid\" 2 \"myblockhash\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
||||
ChainstateManager& chainman = EnsureChainman(node);
|
||||
@@ -393,7 +393,7 @@ static RPCMethod createrawtransaction()
|
||||
+ HelpExampleRpc("createrawtransaction", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"[{\\\"address\\\":0.01}]\"")
|
||||
+ HelpExampleRpc("createrawtransaction", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"[{\\\"data\\\":\\\"00010203\\\"}]\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::optional<bool> rbf;
|
||||
if (!request.params[3].isNull()) {
|
||||
@@ -428,7 +428,7 @@ static RPCMethod decoderawtransaction()
|
||||
HelpExampleCli("decoderawtransaction", "\"hexstring\"")
|
||||
+ HelpExampleRpc("decoderawtransaction", "\"hexstring\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
CMutableTransaction mtx;
|
||||
|
||||
@@ -480,7 +480,7 @@ static RPCMethod decodescript()
|
||||
HelpExampleCli("decodescript", "\"hexstring\"")
|
||||
+ HelpExampleRpc("decodescript", "\"hexstring\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
UniValue r(UniValue::VOBJ);
|
||||
CScript script;
|
||||
@@ -602,7 +602,7 @@ static RPCMethod combinerawtransaction()
|
||||
RPCExamples{
|
||||
HelpExampleCli("combinerawtransaction", R"('["myhex1", "myhex2", "myhex3"]')")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
|
||||
UniValue txs = request.params[0].get_array();
|
||||
@@ -735,7 +735,7 @@ static RPCMethod signrawtransactionwithkey()
|
||||
HelpExampleCli("signrawtransactionwithkey", "\"myhex\" \"[\\\"key1\\\",\\\"key2\\\"]\"")
|
||||
+ HelpExampleRpc("signrawtransactionwithkey", "\"myhex\", \"[\\\"key1\\\",\\\"key2\\\"]\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
CMutableTransaction mtx;
|
||||
if (!DecodeHexTx(mtx, request.params[0].get_str())) {
|
||||
@@ -1056,7 +1056,7 @@ static RPCMethod decodepsbt()
|
||||
RPCExamples{
|
||||
HelpExampleCli("decodepsbt", "\"psbt\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Unserialize the transactions
|
||||
PartiallySignedTransaction psbtx;
|
||||
@@ -1531,7 +1531,7 @@ static RPCMethod combinepsbt()
|
||||
RPCExamples{
|
||||
HelpExampleCli("combinepsbt", R"('["mybase64_1", "mybase64_2", "mybase64_3"]')")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Unserialize the transactions
|
||||
std::vector<PartiallySignedTransaction> psbtxs;
|
||||
@@ -1583,7 +1583,7 @@ static RPCMethod finalizepsbt()
|
||||
RPCExamples{
|
||||
HelpExampleCli("finalizepsbt", "\"psbt\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Unserialize the transactions
|
||||
PartiallySignedTransaction psbtx;
|
||||
@@ -1632,7 +1632,7 @@ static RPCMethod createpsbt()
|
||||
RPCExamples{
|
||||
HelpExampleCli("createpsbt", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"address\\\":0.01}]\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
|
||||
std::optional<bool> rbf;
|
||||
@@ -1687,7 +1687,7 @@ static RPCMethod converttopsbt()
|
||||
"\nConvert the transaction to a PSBT\n"
|
||||
+ HelpExampleCli("converttopsbt", "\"rawtransaction\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// parse hex string from parameter
|
||||
CMutableTransaction tx;
|
||||
@@ -1749,7 +1749,7 @@ static RPCMethod utxoupdatepsbt()
|
||||
RPCExamples {
|
||||
HelpExampleCli("utxoupdatepsbt", "\"psbt\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Parse descriptors, if any.
|
||||
FlatSigningProvider provider;
|
||||
@@ -1793,7 +1793,7 @@ static RPCMethod joinpsbts()
|
||||
RPCExamples {
|
||||
HelpExampleCli("joinpsbts", "\"psbt\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Unserialize the transactions
|
||||
std::vector<PartiallySignedTransaction> psbtxs;
|
||||
@@ -1920,7 +1920,7 @@ static RPCMethod analyzepsbt()
|
||||
RPCExamples {
|
||||
HelpExampleCli("analyzepsbt", "\"psbt\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Unserialize the transaction
|
||||
PartiallySignedTransaction psbtx;
|
||||
@@ -2025,7 +2025,7 @@ RPCMethod descriptorprocesspsbt()
|
||||
HelpExampleCli("descriptorprocesspsbt", "\"psbt\" \"[\\\"descriptor1\\\", \\\"descriptor2\\\"]\"") +
|
||||
HelpExampleCli("descriptorprocesspsbt", "\"psbt\" \"[{\\\"desc\\\":\\\"mydescriptor\\\", \\\"range\\\":21}]\"")
|
||||
},
|
||||
[&](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
[](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
// Add descriptor information to a signing provider
|
||||
FlatSigningProvider provider;
|
||||
|
||||
Reference in New Issue
Block a user