Skip to content

Commit c4927d6

Browse files
authored
refactor the watcher (#462)
1 parent c7f816e commit c4927d6

File tree

3 files changed

+235
-291
lines changed

3 files changed

+235
-291
lines changed

crates/watcher/src/cache.rs

Lines changed: 0 additions & 103 deletions
This file was deleted.

crates/watcher/src/error.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::L1Notification;
22
use alloy_json_rpc::RpcError;
33
use alloy_primitives::B256;
4+
use alloy_sol_types::Error;
45
use alloy_transport::TransportErrorKind;
56
use rollup_node_providers::L1ProviderError;
67
use std::sync::Arc;
@@ -61,6 +62,14 @@ pub enum FilterLogError {
6162
/// Invalid extracted notification length.
6263
#[error("expected {0} notifications, got {1}")]
6364
InvalidNotificationCount(usize, usize),
65+
/// Failed to decode log of expected type.
66+
#[error("failed to decode log as {log_type} with error {error}")]
67+
DecodeLogFailed {
68+
/// The expected log type.
69+
log_type: &'static str,
70+
/// The decoding error.
71+
error: Error,
72+
},
6473
}
6574

6675
/// An error that occurred when accessing data from the cache.

0 commit comments

Comments
 (0)