diff options
author | Andrew Chow <achow101-github@achow101.com> | 2018-09-11 00:09:57 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2018-09-11 00:09:57 -0400 |
commit | fcdea8ad2ac1f4f55133fdf9047410631e9cc21f (patch) | |
tree | 9dda42817177ed32c05127e5b7632b614cf2317d /src | |
parent | 465a583f9dcc2383eb20bbb98bffa66fe82f2cde (diff) | |
download | bitcoin-fcdea8ad2ac1f4f55133fdf9047410631e9cc21f.tar.xz |
Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet things
Instead of dropping the unnecessary UTXO based on whether the wallet did something,
do it based on whether two UTXOs are there.
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index bb7ceb424c..96e63dac23 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4525,8 +4525,8 @@ bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, const C complete &= SignPSBTInput(PublicOnlySigningProvider(pwallet), *psbtx.tx, input, sigdata, i, sighash_type); } - if (it != pwallet->mapWallet.end()) { - // Drop the unnecessary UTXO if we added both from the wallet. + // If both UTXO types are present, drop the unnecessary one. + if (input.non_witness_utxo && !input.witness_utxo.IsNull()) { if (sigdata.witness) { input.non_witness_utxo = nullptr; } else { |