Sponsored Content
Skip to content

fix: Change Tuning::bookOffers minimum limit to 1 - #6812

Merged
bthomee merged 1 commit into
developfrom
bthomee/bookoffers
Apr 10, 2026
Merged

fix: Change Tuning::bookOffers minimum limit to 1#6812
bthomee merged 1 commit into
developfrom
bthomee/bookoffers

Conversation

@bthomee

@bthomee bthomee commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

This change updates the rmin of Tuning::bookOffers from 0 to 1.

Context of Change

Although readLimitField now rejects limit == 0 for all callers, Tuning::bookOffers still has rmin = 0. This is inconsistent and makes the tuning misleading.

In particular, the limit value for bookOffers is passed to getBookOffers, and if the limit is 0 the work loop is skipped entirely:

    while (!bDone && iLimit-- > 0)

From both getBookOffers and doBookOffers, there is no other information added to the return, so you'd get an empty JSON result. The correct solution is therefore to change bookOffers minimum to 1, since the value of 0 is rejected anyway as mentioned earlier.

Copilot AI review requested due to automatic review settings April 8, 2026 20:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates RPC tuning to make book_offers’ minimum limit consistent with readLimitField behavior (which rejects limit == 0).

Changes:

  • Change RPC::Tuning::bookOffers.rmin from 0 to 1 to avoid misleading tuning configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bthomee
bthomee requested a review from mvadari April 8, 2026 21:08
@codecov

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.5%. Comparing base (dfcad69) to head (f993399).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6812     +/-   ##
=========================================
- Coverage     81.6%   81.5%   -0.0%     
=========================================
  Files         1011    1010      -1     
  Lines        75979   75982      +3     
  Branches      7634    7652     +18     
=========================================
- Hits         61985   61958     -27     
- Misses       13994   14024     +30     
Files with missing lines Coverage Δ
src/xrpld/rpc/detail/Tuning.h 100.0% <ø> (ø)

... and 21 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bthomee bthomee added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Apr 10, 2026
@bthomee
bthomee added this pull request to the merge queue Apr 10, 2026
Merged via the queue into develop with commit e2e537b Apr 10, 2026
3 checks passed
@bthomee
bthomee deleted the bthomee/bookoffers branch April 10, 2026 15:05
ximinez pushed a commit that referenced this pull request Apr 10, 2026
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
ximinez pushed a commit that referenced this pull request Apr 22, 2026
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 2026
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants