Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 480360c

Browse files
committed
reuse epoch
1 parent c3ddf9a commit 480360c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check/src/checks/inflation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ impl DoCheck for InflationCheck {
5151

5252
async fn count_rejected_proposals(sdk: &Sdk, state: &mut State) -> Result<u64, String> {
5353
let client = &sdk.namada.client;
54+
let epoch = rpc::query_epoch(client).await.map_err(|e| e.to_string())?;
5455

5556
let mut rejected = 0;
5657
let mut proposal_id = state.last_end_proposal_id.map_or(0, |last_id| last_id + 1);
@@ -62,7 +63,6 @@ async fn count_rejected_proposals(sdk: &Sdk, state: &mut State) -> Result<u64, S
6263
return Ok(0);
6364
};
6465

65-
let epoch = rpc::query_epoch(client).await.map_err(|e| e.to_string())?;
6666
if matches!(proposal.get_status(epoch), ProposalStatus::Ended) {
6767
state.last_end_proposal_id = Some(proposal_id);
6868

0 commit comments

Comments
 (0)