We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8c1491 commit a8003a5Copy full SHA for a8003a5
ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/PerasCertDB/StateMachine.hs
@@ -113,7 +113,15 @@ instance StateModel Model where
113
114
precondition (Model model) = \case
115
OpenDB -> not model.open
116
- _ -> model.open
+ action ->
117
+ model.open && case action of
118
+ CloseDB -> True
119
+ -- Do not add equivocating certificates.
120
+ AddCert cert -> all p model.certs
121
+ where
122
+ p cert' = getPerasCertRound cert /= getPerasCertRound cert' || cert == cert'
123
+ GetWeightSnapshot -> True
124
+ GarbageCollect _slot -> True
125
126
deriving stock instance Show (Action Model a)
127
deriving stock instance Eq (Action Model a)
0 commit comments