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.
This commit is contained in:
Andrew Chow
2020-02-11 19:24:14 -05:00
parent dc174881ad
commit d2774c09cf

View File

@@ -509,6 +509,9 @@ bool SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore,
} else {
input_errors[i] = ScriptErrorString(serror);
}
} else {
// If this input succeeds, make sure there is no error set for it
input_errors.erase(i);
}
}
return input_errors.empty();