Skip to content

fix: query for previous host block instead of current host block #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
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
5 changes: 4 additions & 1 deletion src/tasks/submit/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,12 @@ impl SubmitTask {
// drop guard before await
drop(guard);

// Fetch the previous host block, not the current host block which is currently being built
let prev_host_block = host_block_number - 1;

let Ok(Some(prev_host)) = self
.provider()
.get_block_by_number(host_block_number.into())
.get_block_by_number(prev_host_block.into())
.into_future()
.instrument(span.clone())
.await
Expand Down
Loading