From d2774c09cfcc6c5c967d40bb094eabc8c0bdb6bf Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Tue, 11 Feb 2020 19:24:14 -0500 Subject: 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. --- src/script/sign.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/script') diff --git a/src/script/sign.cpp b/src/script/sign.cpp index a8abd347da..fe8292fe57 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -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(); -- cgit v1.2.3