decipherhub / decipherhub/cipherbft
Panic on cache initialization if size is zero
Open
enhancement
- Dominant language
- Rust
- Stars
- 9
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Several cache initializations panic if the cache size is somehow zero.
**Locations:**
- https://github.com/decipherhub/cipherbft/blob/main/crates/execution/src/database.rs#L20
- https://github.com/decipherhub/cipherbft/blob/main/crates/execution/src/database.rs#L26
- https://github.com/decipherhub/cipherbft/blob/main/crates/execution/src/state.rs#L20
- https://github.com/decipherhub/cipherbft/blob/main/crates/execution/src/engine.rs#L30
While the constants are non-zero, these panics could be replaced with compile-time assertions or graceful error handling.
Contributor guide
Assessment
This issue has not been assessed yet.