mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
More user-friendly error message when partially signing
This commit is contained in:
parent
c22a53cd63
commit
df10edfd03
@ -873,7 +873,12 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
|
||||
|
||||
ScriptError serror = SCRIPT_ERR_OK;
|
||||
if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) {
|
||||
TxInErrorToJSON(txin, vErrors, ScriptErrorString(serror));
|
||||
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 {
|
||||
TxInErrorToJSON(txin, vErrors, ScriptErrorString(serror));
|
||||
}
|
||||
}
|
||||
}
|
||||
bool fComplete = vErrors.empty();
|
||||
|
Loading…
Reference in New Issue
Block a user