Skip to content

Commit b38cdd3

Browse files
committed
add Void to the PraosCredentialsAgent constructor of PraosCredentialsSource to make it unusable
1 parent a2c8356 commit b38cdd3

File tree

1 file changed

+5
-3
lines changed
  • ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos

1 file changed

+5
-3
lines changed

ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import qualified Control.Tracer as Tracer
4343
import Data.Function (on)
4444
import Data.Map.Strict (Map)
4545
import Data.Ord (Down (Down))
46+
import Data.Void
4647
import Data.Word (Word64)
4748
import GHC.Generics (Generic)
4849
import NoThunks.Class
@@ -277,7 +278,8 @@ data PraosCredentialsSource c where
277278
PraosCredentialsUnsound ::
278279
OCert.OCert c -> KES.UnsoundPureSignKeyKES (KES c) -> PraosCredentialsSource c
279280
-- | Connect to a KES agent listening on a service socket at the given path.
280-
PraosCredentialsAgent :: Agent.DSIGN (ACrypto c) ~ DSIGN => FilePath -> PraosCredentialsSource c
281+
PraosCredentialsAgent ::
282+
Agent.DSIGN (ACrypto c) ~ DSIGN => Void -> FilePath -> PraosCredentialsSource c
281283

282284
instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (PraosCredentialsSource c) where
283285
wNoThunks ctxt = \case
@@ -286,7 +288,7 @@ instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (P
286288
[ noThunks ctxt oca
287289
, noThunks ctxt k
288290
]
289-
PraosCredentialsAgent fp -> noThunks ctxt fp
291+
PraosCredentialsAgent _ fp -> noThunks ctxt fp
290292

291293
showTypeOf _ = "PraosCredentialsSource"
292294

@@ -307,7 +309,7 @@ instantiatePraosCredentials maxKESEvolutions _ (PraosCredentialsUnsound ocert sk
307309
sk
308310
startPeriod
309311
maxKESEvolutions
310-
instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent path) = do
312+
instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent _ path) = do
311313
HotKey.mkDynamicHotKey
312314
maxKESEvolutions
313315
( Just $ \handleKey handleDrop -> do

0 commit comments

Comments
 (0)