Merge branch 'ximinez/online-delete-gaps' into ximinez/online-delete-lastrotated

This commit is contained in:
Ed Hennis
2026-03-03 21:49:28 -04:00
committed by GitHub
7 changed files with 27 additions and 24 deletions

View File

@@ -20,7 +20,7 @@ repos:
args: [--assume-in-merge] args: [--assume-in-merge]
- repo: https://github.com/pre-commit/mirrors-clang-format - repo: https://github.com/pre-commit/mirrors-clang-format
rev: 75ca4ad908dc4a99f57921f29b7e6c1521e10b26 # frozen: v21.1.8 rev: cd481d7b0bfb5c7b3090c21846317f9a8262e891 # frozen: v22.1.0
hooks: hooks:
- id: clang-format - id: clang-format
args: [--style=file] args: [--style=file]
@@ -33,17 +33,17 @@ repos:
additional_dependencies: [PyYAML] additional_dependencies: [PyYAML]
- repo: https://github.com/rbubley/mirrors-prettier - repo: https://github.com/rbubley/mirrors-prettier
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2 rev: c2bc67fe8f8f549cc489e00ba8b45aa18ee713b1 # frozen: v3.8.1
hooks: hooks:
- id: prettier - id: prettier
- repo: https://github.com/psf/black-pre-commit-mirror - repo: https://github.com/psf/black-pre-commit-mirror
rev: 831207fd435b47aeffdf6af853097e64322b4d44 # frozen: v25.12.0 rev: ea488cebbfd88a5f50b8bd95d5c829d0bb76feb8 # frozen: 26.1.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/streetsidesoftware/cspell-cli - repo: https://github.com/streetsidesoftware/cspell-cli
rev: 1cfa010f078c354f3ffb8413616280cc28f5ba21 # frozen: v9.4.0 rev: a42085ade523f591dca134379a595e7859986445 # frozen: v9.7.0
hooks: hooks:
- id: cspell # Spell check changed files - id: cspell # Spell check changed files
exclude: .config/cspell.config.yaml exclude: .config/cspell.config.yaml

View File

@@ -23,13 +23,13 @@ public:
static constexpr size_t initialBufferSize = kilobytes(256); static constexpr size_t initialBufferSize = kilobytes(256);
RawStateTable() RawStateTable()
: monotonic_resource_{std::make_unique<boost::container::pmr::monotonic_buffer_resource>( : monotonic_resource_{
initialBufferSize)} std::make_unique<boost::container::pmr::monotonic_buffer_resource>(initialBufferSize)}
, items_{monotonic_resource_.get()} {}; , items_{monotonic_resource_.get()} {};
RawStateTable(RawStateTable const& rhs) RawStateTable(RawStateTable const& rhs)
: monotonic_resource_{std::make_unique<boost::container::pmr::monotonic_buffer_resource>( : monotonic_resource_{
initialBufferSize)} std::make_unique<boost::container::pmr::monotonic_buffer_resource>(initialBufferSize)}
, items_{rhs.items_, monotonic_resource_.get()} , items_{rhs.items_, monotonic_resource_.get()}
, dropsDestroyed_{rhs.dropsDestroyed_} {}; , dropsDestroyed_{rhs.dropsDestroyed_} {};

View File

@@ -72,8 +72,8 @@ OpenView::OpenView(
ReadView const* base, ReadView const* base,
Rules const& rules, Rules const& rules,
std::shared_ptr<void const> hold) std::shared_ptr<void const> hold)
: monotonic_resource_{std::make_unique<boost::container::pmr::monotonic_buffer_resource>( : monotonic_resource_{
initialBufferSize)} std::make_unique<boost::container::pmr::monotonic_buffer_resource>(initialBufferSize)}
, txs_{monotonic_resource_.get()} , txs_{monotonic_resource_.get()}
, rules_(rules) , rules_(rules)
, header_(base->header()) , header_(base->header())
@@ -88,8 +88,8 @@ OpenView::OpenView(
} }
OpenView::OpenView(ReadView const* base, std::shared_ptr<void const> hold) OpenView::OpenView(ReadView const* base, std::shared_ptr<void const> hold)
: monotonic_resource_{std::make_unique<boost::container::pmr::monotonic_buffer_resource>( : monotonic_resource_{
initialBufferSize)} std::make_unique<boost::container::pmr::monotonic_buffer_resource>(initialBufferSize)}
, txs_{monotonic_resource_.get()} , txs_{monotonic_resource_.get()}
, rules_(base->rules()) , rules_(base->rules())
, header_(base->header()) , header_(base->header())

View File

@@ -133,9 +133,9 @@ STVar::constructST(SerializedTypeID id, int depth, Args&&... args)
{ {
construct<T>(std::forward<Args>(args)...); construct<T>(std::forward<Args>(args)...);
} }
else if constexpr (std::is_same_v< else if constexpr (
std::tuple<std::remove_cvref_t<Args>...>, std::
std::tuple<SerialIter, SField>>) is_same_v<std::tuple<std::remove_cvref_t<Args>...>, std::tuple<SerialIter, SField>>)
{ {
construct<T>(std::forward<Args>(args)..., depth); construct<T>(std::forward<Args>(args)..., depth);
} }

View File

@@ -180,7 +180,8 @@ ammAccountHolds(ReadView const& view, AccountID const& ammAccountID, Issue const
if (auto const sle = view.read(keylet::account(ammAccountID))) if (auto const sle = view.read(keylet::account(ammAccountID)))
return (*sle)[sfBalance]; return (*sle)[sfBalance];
} }
else if (auto const sle = view.read(keylet::line(ammAccountID, issue.account, issue.currency)); else if (
auto const sle = view.read(keylet::line(ammAccountID, issue.account, issue.currency));
sle && !isFrozen(view, ammAccountID, issue.currency, issue.account)) sle && !isFrozen(view, ammAccountID, issue.currency, issue.account))
{ {
auto amount = (*sle)[sfBalance]; auto amount = (*sle)[sfBalance];

View File

@@ -42,7 +42,8 @@ AMMVote::preclaim(PreclaimContext const& ctx)
} }
else if (ammSle->getFieldAmount(sfLPTokenBalance) == beast::zero) else if (ammSle->getFieldAmount(sfLPTokenBalance) == beast::zero)
return tecAMM_EMPTY; return tecAMM_EMPTY;
else if (auto const lpTokensNew = ammLPHolds(ctx.view, *ammSle, ctx.tx[sfAccount], ctx.j); else if (
auto const lpTokensNew = ammLPHolds(ctx.view, *ammSle, ctx.tx[sfAccount], ctx.j);
lpTokensNew == beast::zero) lpTokensNew == beast::zero)
{ {
JLOG(ctx.j.debug()) << "AMM Vote: account is not LP."; JLOG(ctx.j.debug()) << "AMM Vote: account is not LP.";

View File

@@ -84,7 +84,8 @@ LoanSet::preflight(PreflightContext const& ctx)
!validNumericMinimum(paymentInterval, LoanSet::minPaymentInterval)) !validNumericMinimum(paymentInterval, LoanSet::minPaymentInterval))
return temINVALID; return temINVALID;
// Grace period is between min default value and payment interval // Grace period is between min default value and payment interval
else if (auto const gracePeriod = tx[~sfGracePeriod]; // else if (
auto const gracePeriod = tx[~sfGracePeriod]; //
!validNumericRange( !validNumericRange(
gracePeriod, gracePeriod,
paymentInterval.value_or(LoanSet::defaultPaymentInterval), paymentInterval.value_or(LoanSet::defaultPaymentInterval),