aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-02-16 14:18:54 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2019-05-10 14:22:33 -0700
commiteaf4f887348a08c620732125ad4430e1a133d434 (patch)
tree81dcc32ec90bd4c5ea8b0ada61e348cfd6b4b0d2 /src/rpc/rawtransaction.cpp
parente79bbb73e08e3f191e97d3b67a2fbb510c5545ff (diff)
Abstract out IsSegWitOutput from utxoupdatepsbt
This is not a pure refactor; additional functionality is added in IsSegWitOutput which lets it recurse into P2SH when a SigningProvider is provided that knows about the inner script.
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index b3926786db..7675ad0109 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1540,9 +1540,7 @@ UniValue utxoupdatepsbt(const JSONRPCRequest& request)
const Coin& coin = view.AccessCoin(psbtx.tx->vin[i].prevout);
- std::vector<std::vector<unsigned char>> solutions_data;
- txnouttype which_type = Solver(coin.out.scriptPubKey, solutions_data);
- if (which_type == TX_WITNESS_V0_SCRIPTHASH || which_type == TX_WITNESS_V0_KEYHASH || which_type == TX_WITNESS_UNKNOWN) {
+ if (IsSegWitOutput(DUMMY_SIGNING_PROVIDER, coin.out.scriptPubKey)) {
input.witness_utxo = coin.out;
}
}