Generalize PublicOnlySigningProvider into HidingSigningProvider

This commit is contained in:
Pieter Wuille
2018-07-20 00:04:02 -07:00
parent 84f1f1bfdf
commit 81e1dd5ce1
3 changed files with 19 additions and 13 deletions
+1 -5
View File
@@ -4520,11 +4520,7 @@ bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, const C
}
SignatureData sigdata;
if (sign) {
complete &= SignPSBTInput(*pwallet, *psbtx.tx, input, sigdata, i, sighash_type);
} else {
complete &= SignPSBTInput(PublicOnlySigningProvider(pwallet), *psbtx.tx, input, sigdata, i, sighash_type);
}
complete &= SignPSBTInput(HidingSigningProvider(pwallet, !sign, false), *psbtx.tx, input, sigdata, i, sighash_type);
if (it != pwallet->mapWallet.end()) {
// Drop the unnecessary UTXO if we added both from the wallet.