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,10 +347,12 @@ impl<D: Db> Cosigning<D> {
// 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);
}
}
}