Add FilesystemStoreV2Error for v1 data detection#4573
Add FilesystemStoreV2Error for v1 data detection#4573tnull merged 1 commit intolightningdevkit:mainfrom
Conversation
FilesystemStoreV2::new previously returned io::Error with ErrorKind::InvalidData when the data directory contained top-level files left behind by FilesystemStore (v1). That forced us to match on an error that could potentially be given by our normal io calls. This adds a dedicated FilesystemStoreV2Error enum with a V1DataDetected(PathBuf) so we can distinguish between normal io errors and an old V1 fs store.
|
👋 Thanks for assigning @tnull as a reviewer! |
|
I've reviewed the entire diff carefully. The change is well-scoped: it introduces a dedicated No issues found. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4573 +/- ##
=======================================
Coverage 87.01% 87.02%
=======================================
Files 161 161
Lines 108972 108979 +7
Branches 108972 108979 +7
=======================================
+ Hits 94827 94836 +9
+ Misses 11660 11657 -3
- Partials 2485 2486 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
FilesystemStoreV2::new previously returned io::Error with ErrorKind::InvalidData when the data directory contained top-level files left behind by FilesystemStore (v1). That forced us to match on an error that could potentially be given by our normal io calls. This adds a dedicated FilesystemStoreV2Error enum with a V1DataDetected(PathBuf) so we can distinguish between normal io errors and an old V1 fs store.
suggested from: lightningdevkit/ldk-node#872 (comment)