diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-08-10 21:33:08 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-08-10 21:33:10 -0400 |
commit | bced8ea71a54d75047ebd9dc96aa879199d310ff (patch) | |
tree | c80f91e03dc0b02d21f7c409e3ca44a613fce649 | |
parent | 09ada21ca282d3e252cf2203cd227860488547ba (diff) | |
parent | 227d27e70c1b41ee88885d72bcf48448aa5a57a9 (diff) |
Merge #13927: rpc: Use pushKV in some new PSBT RPCs
227d27e70c Use pushKV in some new PSBT RPCs. (Daniel Kraft)
Pull request description:
Most of the code uses `UniValue::pushKV` where appropriate, but some new RPC code related to PSBTs did not. This fixes those places - after this change, there are no remaining source files I could find that contain `push_back(Pair(`.
Tree-SHA512: d6567cf144d05d7e42276bd66ff4cd44413328f985772d11bb9d7339d32ab7c3438d4bb0040a37e75f8d193c610b08fa971073935885e0a178546aa045daf9fa
-rw-r--r-- | src/rpc/rawtransaction.cpp | 6 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 28ade1f458..608a1b5da2 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1662,12 +1662,12 @@ UniValue finalizepsbt(const JSONRPCRequest& request) mtx.vin[i].scriptWitness = psbtx.inputs[i].final_script_witness; } ssTx << mtx; - result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end()))); + result.pushKV("hex", HexStr(ssTx.begin(), ssTx.end())); } else { ssTx << psbtx; - result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()))); + result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())); } - result.push_back(Pair("complete", complete)); + result.pushKV("complete", complete); return result; } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 73dfebf114..4e539a85de 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4630,8 +4630,8 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request) UniValue result(UniValue::VOBJ); CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << psbtx; - result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()))); - result.push_back(Pair("complete", complete)); + result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())); + result.pushKV("complete", complete); return result; } |