Log the reason for yielding BlockError::Fatal to Tendermint from the Tributary

This commit is contained in:
Luke Parker 2023-12-07 09:30:25 -05:00
parent 91a024e119
commit 5c047ebe74
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View file

@ -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;

View file

@ -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
}
})
}