Skip to content

Commit

Permalink
Return error instead of panic
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Jul 4, 2024
1 parent 562171c commit 6885cb9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/fuel-core/src/state/in_memory/memory_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ where
_: &Description::Height,
) -> StorageResult<KeyValueView<Self::Column>> {
// TODO: https://github.com/FuelLabs/fuel-core/issues/1995
unimplemented!("The historical view is not implemented for `MemoryStore`")
Err(
anyhow::anyhow!("The historical view is not implemented for `MemoryStore`")
.into(),
)
}

fn latest_view(&self) -> StorageResult<IterableKeyValueView<Self::Column>> {
Expand All @@ -176,7 +179,10 @@ where

fn rollback_last_block(&self) -> StorageResult<()> {
// TODO: https://github.com/FuelLabs/fuel-core/issues/1995
unimplemented!("The historical view is not implemented for `MemoryStore`")
Err(
anyhow::anyhow!("The historical view is not implemented for `MemoryStore`")
.into(),
)
}
}

Expand Down

0 comments on commit 6885cb9

Please sign in to comment.