Skip to content

Commit

Permalink
Log the reason for yielding BlockError::Fatal to Tendermint from the …
Browse files Browse the repository at this point in the history
…Tributary
  • Loading branch information
kayabaNerve committed Dec 7, 2023
1 parent 91a024e commit 5c047eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ async fn handle_processor_message<D: Db, P: P2p>(
if already_handled == msg.id {
return true;
}
} else {
assert_eq!(msg.id, 0);
}

let _hvq_lock = HANDOVER_VERIFY_QUEUE_LOCK.get_or_init(|| Mutex::new(())).lock().await;
Expand Down
5 changes: 4 additions & 1 deletion coordinator/tributary/src/tendermint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ impl<D: Db, T: TransactionTrait, P: P2p> Network for TendermintNetwork<D, T, P>
.verify_block::<Self>(&block, self.signature_scheme(), false)
.map_err(|e| match e {
BlockError::NonLocalProvided(_) => TendermintBlockError::Temporal,
_ => TendermintBlockError::Fatal,
_ => {
log::warn!("Tributary Tendermint validate returning BlockError::Fatal due to {e:?}");
TendermintBlockError::Fatal
}
})
}

Expand Down

0 comments on commit 5c047eb

Please sign in to comment.