diff --git a/zebra-state/src/service.rs b/zebra-state/src/service.rs index be1df4d7673..d9534008c8e 100644 --- a/zebra-state/src/service.rs +++ b/zebra-state/src/service.rs @@ -604,14 +604,17 @@ impl StateService { .contains(&prepared.hash) { let (rsp_tx, rsp_rx) = oneshot::channel(); - let _ = rsp_tx.send(Err("block already sent to be committed to the state".into())); + let _ = rsp_tx.send(Err( + "block has already been sent to be committed to the state".into(), + )); return rsp_rx; } if self.read_service.db.contains_height(prepared.height) { let (rsp_tx, rsp_rx) = oneshot::channel(); let _ = rsp_tx.send(Err( - "block height is already committed to the finalized state".into(), + "block height is in the finalized state: block is already committed to the state" + .into(), )); return rsp_rx; } diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index 31f57a6d15e..f04fcf62e32 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -1040,9 +1040,12 @@ where BlockDownloadVerifyError::Invalid { error: VerifyChainError::Block(VerifyBlockError::Commit(ref source)), .. - } if format!("{source:?}").contains("block is already committed to the state") => { + } if format!("{source:?}").contains("block is already committed to the state") + || format!("{source:?}") + .contains("block has already been sent to be committed to the state") => + { // TODO: improve this by checking the type (#2908) - debug!(error = ?e, "block is already committed, possibly from a previous sync run, continuing"); + debug!(error = ?e, "block is already committed or pending a commit, possibly from a previous sync run, continuing"); false } BlockDownloadVerifyError::DownloadFailed { ref error, .. } @@ -1072,6 +1075,7 @@ where if err_str.contains("AlreadyVerified") || err_str.contains("AlreadyInChain") || err_str.contains("block is already committed to the state") + || err_str.contains("block has already been sent to be committed to the state") || err_str.contains("NotFound") { error!(?e,