Skip to content

Commit

Permalink
Cherry pick: [Consensus 2.0] Fix retries and wait time during fetch b…
Browse files Browse the repository at this point in the history
…lock request timeout (#18034)

## Description 

Cherry pick of #18033

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
akichidis authored Jun 3, 2024
1 parent b50e744 commit 880222c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions consensus/core/src/synchronizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ impl<C: NetworkClient, V: BlockVerifier, D: CoreThreadDispatcher> Synchronizer<C
} // network error
Err(err) => {
// timeout
sleep_until(start + request_timeout).await;
retries += 1;
Err(ConsensusError::NetworkRequestTimeout(err.to_string()))
}
Ok(result) => result,
Expand Down

0 comments on commit 880222c

Please sign in to comment.