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).
This commit is contained in:
Luke Parker
2024-12-26 00:26:48 -05:00
parent df06da5552
commit 3d15710a43

View File

@@ -347,12 +347,14 @@ impl<D: Db> Cosigning<D> {
// Cosign is for a block predating the global session // Cosign is for a block predating the global session
return Ok(false); return Ok(false);
} }
if !faulty {
if let Some(last_block) = GlobalSessionsLastBlock::get(&self.db, cosign.global_session) { if let Some(last_block) = GlobalSessionsLastBlock::get(&self.db, cosign.global_session) {
if cosign.block_number > last_block { if cosign.block_number > last_block {
// Cosign is for a block after the last block this global session should have signed // Cosign is for a block after the last block this global session should have signed
return Ok(false); return Ok(false);
} }
} }
}
// Check the cosign's signature // Check the cosign's signature
{ {