Uh oh!
There was an error while loading. Please reload this page.
persister: Expose method to read ChannelMonitors from disk - #863
Conversation
Codecov Report
@@ Coverage Diff @@## main #863 +/- ##
==========================================
+ Coverage 90.59% 92.49% +1.89%
==========================================
Files 51 51 Lines 27195 32604 +5409 ==========================================
+ Hits 24638 30157 +5519 + Misses 2557 2447 -110
Continue to review full report at Codecov.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| { | ||
| let path = self.path_to_monitor_data(); | ||
| if !Path::new(&path).exists() { | ||
| return Ok(HashMap::new()); |
There was a problem hiding this comment.
Should this be a NotFound error? That way caller's can create the directory if it does not exist.
There was a problem hiding this comment.
Hmm, isn't it more likely its just the first startup and thus there's no monitors?
There was a problem hiding this comment.
I was thinking that the caller would handle creating the directory. But I guess that FilesystemPersister creates it on demand, so probably ok then. Wasn't sure if we want to give the user insight into this (e.g., they instantiate a persister expecting to find data but don't because the path was wrong).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
34e7c66 to
bcd1345Comparebcd1345 to
94aa47bCompare
Tested w/ the sample.