diff options
author | Michael Dietz <michael.dietz@waya.ai> | 2021-05-10 15:14:16 -0400 |
---|---|---|
committer | Michael Dietz <michael.dietz@waya.ai> | 2021-09-24 14:22:53 -0500 |
commit | d64deac7b823a0eba97ab3a3686054eefe330d3c (patch) | |
tree | 64d3de6c88d7e33b77f79bfae9a4dfe939e5d68c /src/rpc | |
parent | 8721638daa8502c7f8de5ae24a9393d7290a2ce5 (diff) | |
download | bitcoin-d64deac7b823a0eba97ab3a3686054eefe330d3c.tar.xz |
refactor: share logic between ScriptPubKeyToUniv and ScriptToUniv
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index d01ff6110c..7d21c4f59b 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1161,7 +1161,7 @@ static RPCHelpMan decodepsbt() txout = input.witness_utxo; UniValue o(UniValue::VOBJ); - ScriptToUniv(txout.scriptPubKey, o, true); + ScriptPubKeyToUniv(txout.scriptPubKey, o, /* fIncludeHex */ true); UniValue out(UniValue::VOBJ); out.pushKV("amount", ValueFromAmount(txout.nValue)); @@ -1208,12 +1208,12 @@ static RPCHelpMan decodepsbt() // Redeem script and witness script if (!input.redeem_script.empty()) { UniValue r(UniValue::VOBJ); - ScriptToUniv(input.redeem_script, r, false); + ScriptToUniv(input.redeem_script, r); in.pushKV("redeem_script", r); } if (!input.witness_script.empty()) { UniValue r(UniValue::VOBJ); - ScriptToUniv(input.witness_script, r, false); + ScriptToUniv(input.witness_script, r); in.pushKV("witness_script", r); } @@ -1268,12 +1268,12 @@ static RPCHelpMan decodepsbt() // Redeem script and witness script if (!output.redeem_script.empty()) { UniValue r(UniValue::VOBJ); - ScriptToUniv(output.redeem_script, r, false); + ScriptToUniv(output.redeem_script, r); out.pushKV("redeem_script", r); } if (!output.witness_script.empty()) { UniValue r(UniValue::VOBJ); - ScriptToUniv(output.witness_script, r, false); + ScriptToUniv(output.witness_script, r); out.pushKV("witness_script", r); } |