aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 8901d10ef6..cc639d8793 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#if defined(HAVE_CONFIG_H)
-#include <config/bitcoin-config.h>
-#endif
+#include <config/bitcoin-config.h> // IWYU pragma: keep
#include <chainparamsbase.h>
#include <clientversion.h>
@@ -299,8 +297,8 @@ public:
total += counts.at(i);
}
addresses.pushKV("total", total);
- result.pushKV("addresses_known", addresses);
- return JSONRPCReplyObj(result, NullUniValue, 1);
+ result.pushKV("addresses_known", std::move(addresses));
+ return JSONRPCReplyObj(std::move(result), NullUniValue, /*id=*/1, JSONRPCVersion::V1_LEGACY);
}
};
@@ -350,7 +348,7 @@ public:
connections.pushKV("in", batch[ID_NETWORKINFO]["result"]["connections_in"]);
connections.pushKV("out", batch[ID_NETWORKINFO]["result"]["connections_out"]);
connections.pushKV("total", batch[ID_NETWORKINFO]["result"]["connections"]);
- result.pushKV("connections", connections);
+ result.pushKV("connections", std::move(connections));
result.pushKV("networks", batch[ID_NETWORKINFO]["result"]["networks"]);
result.pushKV("difficulty", batch[ID_BLOCKCHAININFO]["result"]["difficulty"]);
@@ -369,7 +367,7 @@ public:
}
result.pushKV("relayfee", batch[ID_NETWORKINFO]["result"]["relayfee"]);
result.pushKV("warnings", batch[ID_NETWORKINFO]["result"]["warnings"]);
- return JSONRPCReplyObj(result, NullUniValue, 1);
+ return JSONRPCReplyObj(std::move(result), NullUniValue, /*id=*/1, JSONRPCVersion::V1_LEGACY);
}
};
@@ -624,7 +622,7 @@ public:
}
}
- return JSONRPCReplyObj(UniValue{result}, NullUniValue, 1);
+ return JSONRPCReplyObj(UniValue{result}, NullUniValue, /*id=*/1, JSONRPCVersion::V1_LEGACY);
}
const std::string m_help_doc{
@@ -711,7 +709,7 @@ public:
UniValue result(UniValue::VOBJ);
result.pushKV("address", address_str);
result.pushKV("blocks", reply.get_obj()["result"]);
- return JSONRPCReplyObj(result, NullUniValue, 1);
+ return JSONRPCReplyObj(std::move(result), NullUniValue, /*id=*/1, JSONRPCVersion::V1_LEGACY);
}
protected:
std::string address_str;
@@ -942,7 +940,7 @@ static void GetWalletBalances(UniValue& result)
const UniValue& balance = getbalances.find_value("result")["mine"]["trusted"];
balances.pushKV(wallet_name, balance);
}
- result.pushKV("balances", balances);
+ result.pushKV("balances", std::move(balances));
}
/**