change blocktree*::storage_size() to return Option<u64> to handle live fs changes (#7401)
This commit is contained in:
@@ -1493,7 +1493,7 @@ impl Blocktree {
|
||||
self.last_root()
|
||||
}
|
||||
|
||||
pub fn storage_size(&self) -> u64 {
|
||||
pub fn storage_size(&self) -> Option<u64> {
|
||||
self.db.storage_size()
|
||||
}
|
||||
}
|
||||
|
@@ -580,8 +580,8 @@ impl Database {
|
||||
self.backend.write(batch.write_batch)
|
||||
}
|
||||
|
||||
pub fn storage_size(&self) -> u64 {
|
||||
get_size(&self.path).expect("failure while reading ledger directory size")
|
||||
pub fn storage_size(&self) -> Option<u64> {
|
||||
get_size(&self.path).ok()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user