diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2019-02-16 15:49:36 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2019-05-10 14:31:22 -0700 |
commit | 3135c1a2d2e2fb31bc362c848bd2456d576e408b (patch) | |
tree | 7208865e9fd0c744e70e6c30b4bffa9519b81e96 /src/wallet/psbtwallet.cpp | |
parent | fb90ec3c33e824f5abb6a68452c683d6ce8b3e4a (diff) |
Abstract out UpdatePSBTOutput from FillPSBT
Diffstat (limited to 'src/wallet/psbtwallet.cpp')
-rw-r--r-- | src/wallet/psbtwallet.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/wallet/psbtwallet.cpp b/src/wallet/psbtwallet.cpp index 1b17b09763..ebc48795a0 100644 --- a/src/wallet/psbtwallet.cpp +++ b/src/wallet/psbtwallet.cpp @@ -44,16 +44,7 @@ TransactionError FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& ps // Fill in the bip32 keypaths and redeemscripts for the outputs so that hardware wallets can identify change for (unsigned int i = 0; i < psbtx.tx->vout.size(); ++i) { - const CTxOut& out = psbtx.tx->vout.at(i); - PSBTOutput& psbt_out = psbtx.outputs.at(i); - - // Fill a SignatureData with output info - SignatureData sigdata; - psbt_out.FillSignatureData(sigdata); - - MutableTransactionSignatureCreator creator(psbtx.tx.get_ptr(), 0, out.nValue, 1); - ProduceSignature(HidingSigningProvider(pwallet, true, !bip32derivs), creator, out.scriptPubKey, sigdata); - psbt_out.FromSignatureData(sigdata); + UpdatePSBTOutput(HidingSigningProvider(pwallet, true, !bip32derivs), psbtx, i); } return TransactionError::OK; |