Skip to content

Commit

Permalink
Timeout Duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ktl-XV committed Aug 26, 2024
1 parent ae93205 commit b329bb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,9 @@ fn process_block_events(

pub async fn connect_and_verify(chain: Chain) -> Provider<Http> {
let provider =
Provider::<Http>::try_from(chain.rpc.clone()).expect("could not instantiate HTTP Provider").with_timeout(30);
Provider::<Http>::try_from(chain.rpc.clone())
.expect("could not instantiate HTTP Provider")
.with_timeout(Duration::from_secs(30));

let chainid = provider.get_chainid().await.unwrap();

Expand Down

0 comments on commit b329bb2

Please sign in to comment.