aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2019-06-20 19:40:29 +1000
committerAnthony Towns <aj@erisian.com.au>2019-09-10 15:41:50 +1000
commitec4c79326bb670c2cc1757ecfb1900f8460c5257 (patch)
tree64851d5f99de774e4484845e50e119a434e3c71d /src
parent3c481f8921bbc587cf287329f39243abe703b868 (diff)
downloadbitcoin-ec4c79326bb670c2cc1757ecfb1900f8460c5257.tar.xz
signrawtransaction*: improve error for partial signing
Thanks to Danial Jaffy (tipu) for reporting this issue.
Diffstat (limited to 'src')
-rw-r--r--src/rpc/rawtransaction_util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp
index e05f28347f..f1d176ba4d 100644
--- a/src/rpc/rawtransaction_util.cpp
+++ b/src/rpc/rawtransaction_util.cpp
@@ -309,6 +309,9 @@ UniValue SignTransaction(CMutableTransaction& mtx, const SigningProvider* keysto
if (serror == SCRIPT_ERR_INVALID_STACK_OPERATION) {
// Unable to sign input and verification failed (possible attempt to partially sign).
TxInErrorToJSON(txin, vErrors, "Unable to sign input, invalid stack size (possibly missing key)");
+ } else if (serror == SCRIPT_ERR_SIG_NULLFAIL) {
+ // Verification failed (possibly due to insufficient signatures).
+ TxInErrorToJSON(txin, vErrors, "CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)");
} else {
TxInErrorToJSON(txin, vErrors, ScriptErrorString(serror));
}