Skip to content

Commit

Permalink
fix(sidecar): don't remove constraints before accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Bostoen committed Nov 9, 2024
1 parent 676e139 commit 3173638
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bolt-sidecar/src/state/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ impl<C: StateFetcher> ExecutionState<C> {
let update = self.client.get_state_update(accounts, block_number).await?;
trace!(%slot, ?update, "Applying execution state update");

self.apply_state_update(update);

// Remove any block templates that are no longer valid
// NOTE: this needs to be called BEFORE applying the state update or we might remove
// constraints for which we need to get the receipts.
if let Some(template) = self.remove_block_template(slot) {
debug!(%slot, "Removed block template for slot");
let hashes = template.transaction_hashes();
Expand Down Expand Up @@ -494,6 +494,8 @@ impl<C: StateFetcher> ExecutionState<C> {
}
}

self.apply_state_update(update);

Ok(())
}

Expand Down

0 comments on commit 3173638

Please sign in to comment.