Skip to content

Commit

Permalink
PR fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
piohei committed Jan 9, 2025
1 parent 59fafa4 commit 7eac133
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/identity/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,17 @@ impl OnChainIdentityProcessor {
// how required mined_at field is set, We set proper state only if not set
// previously.
let root_state = tx.get_root_state(&post_root).await?;
match root_state {
Some(root_state) if root_state.status == ProcessedStatus::Processed => {}
Some(root_state) if root_state.status == ProcessedStatus::Mined => {}
_ => {
tx.mark_root_as_processed(&post_root).await?;
if let Some(root_state) = root_state {
if root_state.status == ProcessedStatus::Processed || root_state.status == ProcessedStatus::Mined {
return Ok::<(), anyhow::Error>(());
}
}

tx.mark_root_as_processed(&post_root).await?;

Ok::<(), anyhow::Error>(())
})
.await?;
.await?;

info!(?pre_root, ?post_root, ?kind, "Batch mined");

Expand Down
2 changes: 1 addition & 1 deletion src/task_monitor/tasks/modify_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub async fn modify_tree(
let mut timer = time::interval(Duration::from_secs(5));

loop {
// We wait either for a timer tick or a full batch
// We wait either for a timer tick or a event that tree was synchronized
select! {
_ = timer.tick() => {
info!("Modify tree task woken due to timeout");
Expand Down

0 comments on commit 7eac133

Please sign in to comment.