reverse negated else

This commit is contained in:
Denis Angell
2026-02-26 22:27:24 +01:00
parent 359a94b766
commit 90d2eb839a

View File

@@ -496,14 +496,7 @@ Batch::checkBatchSign(PreclaimContext const& ctx)
auto const idSigner = calcAccountID(PublicKey(makeSlice(pkSigner)));
auto const sleAccount = ctx.view.read(keylet::account(idAccount));
// A batch can include transactions from an un-created account ONLY
// when the account master key is the signer
if (!sleAccount)
{
if (idAccount != idSigner)
return tefBAD_AUTH;
}
else
if (sleAccount)
{
if (isPseudoAccount(sleAccount))
return tefBAD_AUTH;
@@ -512,6 +505,14 @@ Batch::checkBatchSign(PreclaimContext const& ctx)
!isTesSuccess(ret))
return ret;
}
else
{
if (idAccount != idSigner)
return tefBAD_AUTH;
// A batch can include transactions from an un-created account ONLY
// when the account master key is the signer
}
}
}
return ret;