Skip to content

Commit

Permalink
save one last checkpoint on stage run
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Nov 16, 2023
1 parent 662da5c commit 1ac1618
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/reth/src/stage/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,16 @@ impl Command {
input.checkpoint = Some(checkpoint);

provider_rw.save_stage_checkpoint(exec_stage.id(), checkpoint)?;

if self.commit {
provider_rw.commit()?;
provider_rw = factory.provider_rw().map_err(PipelineError::Interface)?;
}
}

if let Some(checkpoint) = input.checkpoint {
provider_rw.save_stage_checkpoint(exec_stage.id(), checkpoint)?;
}

if self.commit {
provider_rw.commit()?;
}
Expand Down

0 comments on commit 1ac1618

Please sign in to comment.