Skip to content

feat: Read and write LedgerCache to file#2761

Merged
kuznetsss merged 36 commits intoXRPLF:developfrom
kuznetsss:2413_Read_write_cache_from_disk
Nov 13, 2025
Merged

feat: Read and write LedgerCache to file#2761
kuznetsss merged 36 commits intoXRPLF:developfrom
kuznetsss:2413_Read_write_cache_from_disk

Conversation

@kuznetsss
Copy link
Collaborator

Fixes #2413.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 77.33990% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.01%. Comparing base (c6308ce) to head (b5567bc).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/data/impl/LedgerCacheFile.cpp 73.95% 12 Missing and 13 partials ⚠️
src/app/ClioApplication.cpp 0.00% 10 Missing ⚠️
src/etl/CacheLoader.hpp 80.00% 1 Missing and 3 partials ⚠️
src/etl/ETLService.cpp 40.00% 1 Missing and 2 partials ⚠️
src/etl/CacheLoaderSettings.cpp 50.00% 1 Missing and 1 partial ⚠️
src/data/BackendInterface.cpp 88.88% 0 Missing and 1 partial ⚠️
src/data/Types.hpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2761      +/-   ##
===========================================
+ Coverage    81.94%   82.01%   +0.06%     
===========================================
  Files          372      378       +6     
  Lines        14009    14208     +199     
  Branches      7744     7843      +99     
===========================================
+ Hits         11479    11652     +173     
  Misses        1438     1438              
- Partials      1092     1118      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@kuznetsss kuznetsss force-pushed the 2413_Read_write_cache_from_disk branch from 8123e9f to c22fa4a Compare November 10, 2025 16:21
Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

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

Left a few suggestions

@godexsoft godexsoft self-requested a review November 13, 2025 16:00
@kuznetsss kuznetsss merged commit 346c9f9 into XRPLF:develop Nov 13, 2025
30 checks passed
@kuznetsss kuznetsss deleted the 2413_Read_write_cache_from_disk branch November 13, 2025 17:01
bool
InputFile::readRaw(char* data, size_t size)
{
file_.read(data, size);
Copy link
Contributor

Choose a reason for hiding this comment

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

null check before reading?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will crash anyway if nullptr is passed here. Or do you mean something else?

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.

Implement Cache Writing/Reading from Disk

4 participants