Skip to content

Commit 227d27e

Browse files
committed
Use pushKV in some new PSBT RPCs.
Most of the code uses UniValue::pushKV where appropriate, but some new RPC code related to PSBTs did not.
1 parent 3e3a50a commit 227d27e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,12 +1662,12 @@ UniValue finalizepsbt(const JSONRPCRequest& request)
16621662
mtx.vin[i].scriptWitness = psbtx.inputs[i].final_script_witness;
16631663
}
16641664
ssTx << mtx;
1665-
result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end())));
1665+
result.pushKV("hex", HexStr(ssTx.begin(), ssTx.end()));
16661666
} else {
16671667
ssTx << psbtx;
1668-
result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())));
1668+
result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
16691669
}
1670-
result.push_back(Pair("complete", complete));
1670+
result.pushKV("complete", complete);
16711671

16721672
return result;
16731673
}

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4630,8 +4630,8 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request)
46304630
UniValue result(UniValue::VOBJ);
46314631
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
46324632
ssTx << psbtx;
4633-
result.push_back(Pair("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size())));
4634-
result.push_back(Pair("complete", complete));
4633+
result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
4634+
result.pushKV("complete", complete);
46354635

46364636
return result;
46374637
}

0 commit comments

Comments
 (0)