diff options
Diffstat (limited to 'src/rest.cpp')
-rw-r--r-- | src/rest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rest.cpp b/src/rest.cpp index 9fc5d4af04..d43018f5af 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -39,6 +39,7 @@ using node::GetTransaction; using node::NodeContext; +using util::SplitString; static const size_t MAX_GETUTXOS_OUTPOINTS = 15; //allow a max of 15 outpoints to be queried at once static constexpr unsigned int MAX_REST_HEADERS_RESULTS = 2000; @@ -934,10 +935,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"; |