Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

skip null round retry #428

Merged
merged 6 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions fendermint/vm/topdown/src/finality/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::finality::null::FinalityWithNull;
use crate::finality::ParentViewPayload;
use crate::proxy::ParentQueryProxy;
use crate::{
handle_null_round, BlockHash, BlockHeight, Config, Error, IPCParentFinality,
ParentFinalityProvider, ParentViewProvider,
handle_null_round, is_null_round_error, BlockHash, BlockHeight, Config, Error,
IPCParentFinality, ParentFinalityProvider, ParentViewProvider,
};
use async_stm::{Stm, StmResult};
use ipc_sdk::cross::CrossMsg;
Expand Down Expand Up @@ -34,6 +34,12 @@ macro_rules! retry {
tracing::warn!(
"cannot query ipc parent_client due to: {e}, retires: {retries}, wait: {wait:?}"
);

// there is no point in retrying if the current block is null round
if is_null_round_error(&e) {
aakoshh marked this conversation as resolved.
Show resolved Hide resolved
break res;
}

if retries > 0 {
retries -= 1;

Expand Down
Loading