Skip to content

Commit ec4c793

Browse files
committed
signrawtransaction*: improve error for partial signing
Thanks to Danial Jaffy (tipu) for reporting this issue.
1 parent 3c481f8 commit ec4c793

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/rpc/rawtransaction_util.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ UniValue SignTransaction(CMutableTransaction& mtx, const SigningProvider* keysto
309309
if (serror == SCRIPT_ERR_INVALID_STACK_OPERATION) {
310310
// Unable to sign input and verification failed (possible attempt to partially sign).
311311
TxInErrorToJSON(txin, vErrors, "Unable to sign input, invalid stack size (possibly missing key)");
312+
} else if (serror == SCRIPT_ERR_SIG_NULLFAIL) {
313+
// Verification failed (possibly due to insufficient signatures).
314+
TxInErrorToJSON(txin, vErrors, "CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)");
312315
} else {
313316
TxInErrorToJSON(txin, vErrors, ScriptErrorString(serror));
314317
}

0 commit comments

Comments
 (0)