mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
scripted-diff: Use UniValue::find_value method
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i 's/find_value\(([^ ,]+), /\1.find_value(/g' $(git grep -l find_value) -END VERIFY SCRIPT-
This commit is contained in:
@@ -612,7 +612,7 @@ static RPCHelpMan getblocktemplate()
|
||||
if (!request.params[0].isNull())
|
||||
{
|
||||
const UniValue& oparam = request.params[0].get_obj();
|
||||
const UniValue& modeval = find_value(oparam, "mode");
|
||||
const UniValue& modeval = oparam.find_value("mode");
|
||||
if (modeval.isStr())
|
||||
strMode = modeval.get_str();
|
||||
else if (modeval.isNull())
|
||||
@@ -621,11 +621,11 @@ static RPCHelpMan getblocktemplate()
|
||||
}
|
||||
else
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
|
||||
lpval = find_value(oparam, "longpollid");
|
||||
lpval = oparam.find_value("longpollid");
|
||||
|
||||
if (strMode == "proposal")
|
||||
{
|
||||
const UniValue& dataval = find_value(oparam, "data");
|
||||
const UniValue& dataval = oparam.find_value("data");
|
||||
if (!dataval.isStr())
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, "Missing data String key for proposal");
|
||||
|
||||
@@ -652,7 +652,7 @@ static RPCHelpMan getblocktemplate()
|
||||
return BIP22ValidationResult(state);
|
||||
}
|
||||
|
||||
const UniValue& aClientRules = find_value(oparam, "rules");
|
||||
const UniValue& aClientRules = oparam.find_value("rules");
|
||||
if (aClientRules.isArray()) {
|
||||
for (unsigned int i = 0; i < aClientRules.size(); ++i) {
|
||||
const UniValue& v = aClientRules[i];
|
||||
|
||||
Reference in New Issue
Block a user