aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2018-10-26 15:18:52 -0700
committerGlenn Willen <gwillen@nerdnet.org>2018-11-01 12:11:24 -0700
commitfe5d22bc676f158e8d567d71edb3451118759d62 (patch)
treecd806a8e495cf87e6a1a99e173f903045513785c /src/wallet/rpcwallet.cpp
parent51e5ef3971c78f0aceb7e958c07f5e6cde224db0 (diff)
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.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 2aeb5c2984..5f3fece325 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3842,7 +3842,7 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request)
UniValue result(UniValue::VOBJ);
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << psbtx;
- result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
+ result.pushKV("psbt", EncodeBase64(ssTx.str()));
result.pushKV("complete", complete);
return result;
@@ -3956,7 +3956,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
ssTx << psbtx;
UniValue result(UniValue::VOBJ);
- result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
+ result.pushKV("psbt", EncodeBase64(ssTx.str()));
result.pushKV("fee", ValueFromAmount(fee));
result.pushKV("changepos", change_position);
return result;