aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 89c033b8a3..4e9d8fd2b1 100644
--- a/src/rest.cpp
+++ b/src/rest.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 <rest.h>
@@ -936,10 +934,10 @@ static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::
// include the script in a json output
UniValue o(UniValue::VOBJ);
ScriptToUniv(coin.out.scriptPubKey, /*out=*/o, /*include_hex=*/true, /*include_address=*/true);
- utxo.pushKV("scriptPubKey", o);
- utxos.push_back(utxo);
+ utxo.pushKV("scriptPubKey", std::move(o));
+ utxos.push_back(std::move(utxo));
}
- objGetUTXOResponse.pushKV("utxos", utxos);
+ objGetUTXOResponse.pushKV("utxos", std::move(utxos));
// return json string
std::string strJSON = objGetUTXOResponse.write() + "\n";