Skip to content

Commit d2774c0

Browse files
committed
Clear any input_errors for an input after it is signed
Make sure that there are no errors set for an input after it is signed. This is useful for when there are multiple ScriptPubKeyMans. Some may fail to sign, but one may be able to sign, and after it does, we don't want there to be any more errors there.
1 parent dc17488 commit d2774c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/script/sign.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,9 @@ bool SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore,
509509
} else {
510510
input_errors[i] = ScriptErrorString(serror);
511511
}
512+
} else {
513+
// If this input succeeds, make sure there is no error set for it
514+
input_errors.erase(i);
512515
}
513516
}
514517
return input_errors.empty();

0 commit comments

Comments
 (0)