aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2018-10-26 15:18:52 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-12-03 10:34:20 -0800
commitcfdd6b2f6c01c5c8dbe4691cc84c65b9705784c3 (patch)
tree5188ca63db09af206ea0b003b0de95ec5b88032d /src/rpc
parenta3fe125490978a684528c40fc9a15ccdfdf2c92a (diff)
downloadbitcoin-cfdd6b2f6c01c5c8dbe4691cc84c65b9705784c3.tar.xz
More concise conversion of CDataStream to string
Use .str() instead of .data() and .size() when converting CDataStream to a string. Uses std::string, avoiding conversion to a C string. Github-Pull: #14588 Rebased-From: fe5d22bc676f158e8d567d71edb3451118759d62
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rawtransaction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 314184ab06..2fdbe38145 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1662,10 +1662,10 @@ UniValue finalizepsbt(const JSONRPCRequest& request)
mtx.vin[i].scriptWitness = psbtx.inputs[i].final_script_witness;
}
ssTx << mtx;
- result.pushKV("hex", HexStr(ssTx.begin(), ssTx.end()));
+ result.pushKV("hex", HexStr(ssTx.str()));
} else {
ssTx << psbtx;
- result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
+ result.pushKV("psbt", EncodeBase64(ssTx.str()));
}
result.pushKV("complete", complete);