From 3d15710a4356fff4ee69b74d82f61cebd53534ef Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 26 Dec 2024 00:26:48 -0500 Subject: [PATCH] Only check the cosign is after its start block if faulty We don't have consensus on the session's last block, so we shouldn't check if the cosign is before the session ends. What matters is that network, within its set, claims it's still active at that block (on its view of the blockchain). --- coordinator/cosign/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/coordinator/cosign/src/lib.rs b/coordinator/cosign/src/lib.rs index 2c145cf0..3f771983 100644 --- a/coordinator/cosign/src/lib.rs +++ b/coordinator/cosign/src/lib.rs @@ -347,10 +347,12 @@ impl Cosigning { // Cosign is for a block predating the global session return Ok(false); } - if let Some(last_block) = GlobalSessionsLastBlock::get(&self.db, cosign.global_session) { - if cosign.block_number > last_block { - // Cosign is for a block after the last block this global session should have signed - return Ok(false); + if !faulty { + if let Some(last_block) = GlobalSessionsLastBlock::get(&self.db, cosign.global_session) { + if cosign.block_number > last_block { + // Cosign is for a block after the last block this global session should have signed + return Ok(false); + } } }