From ec4c79326bb670c2cc1757ecfb1900f8460c5257 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 20 Jun 2019 19:40:29 +1000 Subject: [PATCH] signrawtransaction*: improve error for partial signing Thanks to Danial Jaffy (tipu) for reporting this issue. --- src/rpc/rawtransaction_util.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp index e05f28347..f1d176ba4 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)); }