(
&self,
http_url: Url,
alloy_provider: AlloyProvider,
)
| 40 | const BLOCK_POLL_INTERVAL: Duration = Duration::from_millis(500); |
| 41 | |
| 42 | pub async fn stream( |
| 43 | &self, |
| 44 | http_url: Url, |
| 45 | alloy_provider: AlloyProvider, |
| 46 | ) -> Result<CurrentBlockWatcher> { |
| 47 | match &self.node_ws_url { |
| 48 | Some(ws_url) => current_block_ws_stream(alloy_provider, ws_url.clone()).await, |
| 49 | #[allow(deprecated)] |
| 50 | None => { |
| 51 | current_block_stream( |
| 52 | http_url, |
| 53 | self.block_stream_poll_interval |
| 54 | .unwrap_or(Self::BLOCK_POLL_INTERVAL), |
| 55 | ) |
| 56 | .await |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | impl From<&configs::shared::CurrentBlockConfig> for Arguments { |
no test coverage detected