MCPcopy Create free account
hub / github.com/cowprotocol/services / stream

Method stream

crates/shared/src/current_block.rs:42–59  ·  view source on GitHub ↗
(
        &self,
        http_url: Url,
        alloy_provider: AlloyProvider,
    )

Source from the content-addressed store, hash-verified

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
62impl From<&configs::shared::CurrentBlockConfig> for Arguments {

Callers 4

newMethod · 0.80
shadow_modeFunction · 0.80
newMethod · 0.80
runFunction · 0.80

Calls 3

current_block_ws_streamFunction · 0.85
current_block_streamFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected