Skip to content

fix: Restore config changes that broke standalone mode#6301

Merged
bthomee merged 2 commits intodevelopfrom
bthomee/config
Feb 3, 2026
Merged

fix: Restore config changes that broke standalone mode#6301
bthomee merged 2 commits intodevelopfrom
bthomee/config

Conversation

@bthomee
Copy link
Copy Markdown
Collaborator

@bthomee bthomee commented Jan 30, 2026

High Level Overview of Change

This change restores two modifications to Config.cpp that currently break running the binary in standalone mode.

Fixes #6299

Context of Change

When support was added for xrpld.cfg in addition to rippled.cfg in #6098, as part of an effort to rename occurrences of ripple(d) to xrpl(d), the clearing and creation of the data directory were modified for what, at the time, seemed to result in an equivalent code flow. This has turned out to not be true, which is why this change restores specific modifications.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

@bthomee bthomee mentioned this pull request Jan 30, 2026
9 tasks
@bthomee bthomee requested a review from legleux January 30, 2026 10:32
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.8%. Comparing base (fe31cdc) to head (bfc8940).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6301     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.0%     
=========================================
  Files          839     839             
  Lines        65528   65530      +2     
  Branches      7273    7292     +19     
=========================================
- Hits         52324   52303     -21     
- Misses       13204   13227     +23     
Files with missing lines Coverage Δ
src/xrpld/core/detail/Config.cpp 74.8% <100.0%> (+0.1%) ⬆️

... and 4 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 requested a review from a1q123456 February 2, 2026 13:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in standalone mode that was introduced by PR #6098. The bug prevented xrpld from starting in standalone mode when the database directory didn't exist, causing crashes with "unable to open database file" or filesystem errors.

Changes:

  • Restored logic to clear the data directory path when running in standalone mode without an explicit database_path configuration
  • Changed directory creation condition from checking if NOT in standalone mode to checking if the data directory path is not empty

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

Copy link
Copy Markdown
Collaborator

@legleux legleux left a comment

Choose a reason for hiding this comment

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

Seems to resolve the issue of the directory not being created at startup

@bthomee bthomee enabled auto-merge (squash) February 3, 2026 00:47
@bthomee bthomee merged commit b182430 into develop Feb 3, 2026
25 checks passed
@bthomee bthomee deleted the bthomee/config branch February 3, 2026 01:15
bthomee added a commit that referenced this pull request Feb 3, 2026
When support was added for `xrpld.cfg` in addition to `rippled.cfg` in #6098, as part of an effort to rename occurrences of ripple(d) to xrpl(d), the clearing and creation of the data directory were modified for what, at the time, seemed to result in an equivalent code flow. This has turned out to not be true, which is why this change restores two modifications to `Config.cpp` that currently break running the binary in standalone mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standalone mode config broken Version: develop

4 participants