Skip to content

Commit

Permalink
Fix logic error in Shelley checkIsLeader.hasValidOCert
Browse files Browse the repository at this point in the history
Operational certificates should also be valid during the KES start period and not just
afterward.
  • Loading branch information
intricate committed May 15, 2020
1 parent e88f0ee commit da7e540
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -343,7 +343,7 @@ instance TPraosCrypto c => ConsensusProtocol (TPraos c) where
-- current KES period.
hasValidOCert :: TPraosIsCoreNode c -> Bool
hasValidOCert TPraosIsCoreNode{tpraosIsCoreNodeOpCert} =
kesPeriod > c0 && kesPeriod < c1
kesPeriod >= c0 && kesPeriod < c1
where
SL.OCert _ _ (SL.KESPeriod c0) _ = tpraosIsCoreNodeOpCert
c1 = c0 + fromIntegral (tpraosMaxKESEvo tpraosParams)
Expand Down

0 comments on commit da7e540

Please sign in to comment.