mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 18:26:51 +00:00
Improve error message when signing fails (RIPD-1066):
With the addition of multisigning there are a variety of reasons a signature may fail. We now return a more descriptive message for the reason certain signature checks fail.
This commit is contained in:
committed by
Nik Bougalis
parent
ed9f5639a8
commit
2eaf211e9b
@@ -88,14 +88,17 @@ preflight1 (PreflightContext const& ctx)
|
||||
TER
|
||||
preflight2 (PreflightContext const& ctx)
|
||||
{
|
||||
if(!( ctx.flags & tapNO_CHECK_SIGN) &&
|
||||
checkValidity(ctx.app.getHashRouter(),
|
||||
ctx.tx, ctx.rules, ctx.app.config()).first == Validity::SigBad)
|
||||
if(!( ctx.flags & tapNO_CHECK_SIGN))
|
||||
{
|
||||
JLOG(ctx.j.debug) << "preflight2: bad signature";
|
||||
return temINVALID;
|
||||
auto const sigValid = checkValidity(ctx.app.getHashRouter(),
|
||||
ctx.tx, ctx.rules, ctx.app.config());
|
||||
if (sigValid.first == Validity::SigBad)
|
||||
{
|
||||
JLOG(ctx.j.debug) <<
|
||||
"preflight2: bad signature. " << sigValid.second;
|
||||
return temINVALID;
|
||||
}
|
||||
}
|
||||
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user