aboutsummaryrefslogtreecommitdiff
path: root/src/script/sign.cpp
diff options
context:
space:
mode:
authorAndrew Chow <[email protected]>2020-02-11 19:24:14 -0500
committerAndrew Chow <[email protected]>2020-03-09 11:16:20 -0400
commitd2774c09cfcc6c5c967d40bb094eabc8c0bdb6bf (patch)
tree219d788dcd228bb6993def93e6b8e89890773327 /src/script/sign.cpp
parentReplace GetSigningProvider with GetSolvingProvider (diff)
downloaddiscoin-d2774c09cfcc6c5c967d40bb094eabc8c0bdb6bf.tar.xz
discoin-d2774c09cfcc6c5c967d40bb094eabc8c0bdb6bf.zip
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.
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r--src/script/sign.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index a8abd347d..fe8292fe5 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();