mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-14 17:57:57 -05:00
refactor: improve error handling in trie_node method
- Updated the error conversion helper function in ProofTaskTrieNodeProvider to directly wrap the ProviderError, enhancing clarity and maintainability. - This change simplifies the error handling logic within the trie_node method.
This commit is contained in:
@@ -1082,7 +1082,7 @@ impl TrieNodeProvider for ProofTaskTrieNodeProvider {
|
||||
fn trie_node(&self, path: &Nibbles) -> Result<Option<RevealedNode>, SparseTrieError> {
|
||||
/// Helper to convert `ProviderError` to `SparseTrieError`
|
||||
fn provider_err_to_trie_err(e: ProviderError) -> SparseTrieError {
|
||||
SparseTrieErrorKind::Other(Box::new(std::io::Error::other(e.to_string()))).into()
|
||||
SparseTrieErrorKind::Other(Box::new(e)).into()
|
||||
}
|
||||
|
||||
/// Helper to convert channel recv error to `SparseTrieError`
|
||||
|
||||
Reference in New Issue
Block a user