fix: Restore config changes that broke standalone mode - #6301
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
legleux
left a comment
There was a problem hiding this comment.
Seems to resolve the issue of the directory not being created at startup
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.
When support was added for `xrpld.cfg` in addition to `rippled.cfg` in XRPLF#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.
High Level Overview of Change
This change restores two modifications to
Config.cppthat currently break running the binary in standalone mode.Fixes #6299
Context of Change
When support was added for
xrpld.cfgin addition torippled.cfgin #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
.gitignore, formatting, dropping support for older tooling)