Skip to content

Store swallows DB errors with .expect(), propagate Result through storage layer #306

@d4m014

Description

@d4m014

crates/storage/src/store.rs calls StorageBackend methods (begin_read, begin_write, put_batch, commit, etc.) but swallows all returned Results via .expect() at 50+ call sites. Any DB error (disk full, corruption, etc.) panics the node instead of being handled gracefully.

The fix is to make Store's public methods return Result<T, Error> and propagate with ?, then update callers in crates/blockchain/src/store.rs accordingly.

Related: #82

Fixing this is also a prerequisite for #266. Without it, the "too many open files" error panics the node rather than being returned as a recoverable error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions