mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Always try to sign for all pubkeys in multisig
This commit is contained in:
parent
81610eddbc
commit
501acb5538
1 changed files with 7 additions and 2 deletions
|
@ -144,8 +144,13 @@ static bool SignStep(const SigningProvider& provider, const BaseSignatureCreator
|
|||
ret.push_back(valtype()); // workaround CHECKMULTISIG bug
|
||||
for (size_t i = 1; i < vSolutions.size() - 1; ++i) {
|
||||
CPubKey pubkey = CPubKey(vSolutions[i]);
|
||||
if (ret.size() < required + 1 && CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) {
|
||||
ret.push_back(std::move(sig));
|
||||
// We need to always call CreateSig in order to fill sigdata with all
|
||||
// possible signatures that we can create. This will allow further PSBT
|
||||
// processing to work as it needs all possible signature and pubkey pairs
|
||||
if (CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) {
|
||||
if (ret.size() < required + 1) {
|
||||
ret.push_back(std::move(sig));
|
||||
}
|
||||
}
|
||||
}
|
||||
bool ok = ret.size() == required + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue