misc review comments

This commit is contained in:
Denis Angell
2026-03-24 14:09:44 +01:00
parent 6cb9f336da
commit bcb48fbad3
7 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ class BatchBuilder;
*
* Type: ttBATCH (71)
* Delegable: Delegation::notDelegable
* Amendment: featureBatch
* Amendment: featureBatchV1_1
* Privileges: noPriv
*
* Immutable wrapper around STTx providing type-safe field access.

View File

@@ -185,7 +185,7 @@ OpenView::txsEnd() const -> std::unique_ptr<txs_type::iter_base>
bool
OpenView::txExists(key_type const& key) const
{
return txs_.contains(key);
return txs_.contains(key) || base_->txExists(key);
}
auto

View File

@@ -511,6 +511,7 @@ multiSignHelper(
return Unexpected(
std::string("Invalid signature on account ") + toBase58(accountID) +
(errorWhat ? ": " + *errorWhat : "") + ".");
}
}
// All signatures verified.
return {};

View File

@@ -983,7 +983,7 @@ Transactor::reset(XRPAmount fee)
// balance should have already been checked in checkFee / preFlight.
XRPL_ASSERT(
balance != beast::zero && (!view().open() || balance >= fee),
(fee == beast::zero || balance != beast::zero) && (!view().open() || balance >= fee),
"xrpl::Transactor::reset : valid balance");
// We retry/reject the transaction if the account balance is zero or

View File

@@ -286,7 +286,7 @@ Payment::preclaim(PreclaimContext const& ctx)
// transaction would succeed.
return tecNO_DST;
}
if (ctx.view.open() && partialPaymentAllowed)
if (partialPaymentAllowed)
{
// You cannot fund an account with a partial payment.
// Make retry work smaller, by rejecting this.
@@ -323,7 +323,7 @@ Payment::preclaim(PreclaimContext const& ctx)
}
// Payment with at least one intermediate step and uses transitive balances.
if ((hasPaths || sendMax || !dstAmount.native()) && ctx.view.open())
if (hasPaths || sendMax || !dstAmount.native())
{
STPathSet const& paths = ctx.tx.getFieldPathSet(sfPaths);

View File

@@ -89,7 +89,7 @@ Batch::calculateBaseFee(ReadView const& view, STTx const& tx)
}
// Calculate the Signers/BatchSigners Fees
std::int32_t signerCount = 0;
std::uint32_t signerCount = 0;
if (tx.isFieldPresent(sfBatchSigners))
{
auto const& signers = tx.getFieldArray(sfBatchSigners);
@@ -413,7 +413,7 @@ Batch::preflightSigValidated(PreflightContext const& ctx)
STArray const& signers = ctx.tx.getFieldArray(sfBatchSigners);
// Check that the batch signers array is not too large.
if (signers.size() > maxBatchTxCount)
if (signers.size() > rawTxns.size())
{
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
<< "signers array exceeds 8 entries.";

View File

@@ -20,7 +20,6 @@ namespace test {
class TxQPosNegFlows_test : public beast::unit_test::suite
{
void
fillQueue(jtx::Env& env, jtx::Account const& account)
{