Skip to content

Commit 4056c3f

Browse files
committed
Rename ShelleyBasedBlock to IsShelleyBlock.
1 parent a47c5ca commit 4056c3f

File tree

3 files changed

+8
-8
lines changed
  • ouroboros-consensus-cardano/src
    • ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano
    • shelley/Ouroboros/Consensus/Shelley/Ledger
    • unstable-cardano-tools/Cardano/Tools/DBAnalyser/Block

3 files changed

+8
-8
lines changed

ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ import qualified Ouroboros.Consensus.Protocol.TPraos as Shelley
112112
import Ouroboros.Consensus.Shelley.HFEras ()
113113
import Ouroboros.Consensus.Shelley.Ledger (ShelleyBlock)
114114
import qualified Ouroboros.Consensus.Shelley.Ledger as Shelley
115-
import Ouroboros.Consensus.Shelley.Ledger.Block (ShelleyBasedBlock,
115+
import Ouroboros.Consensus.Shelley.Ledger.Block (IsShelleyBlock,
116116
ShelleyBlockLedgerEra)
117117
import Ouroboros.Consensus.Shelley.Ledger.NetworkProtocolVersion
118118
import Ouroboros.Consensus.Shelley.Node
@@ -978,7 +978,7 @@ protocolInfoCardano paramsCardano
978978

979979
registerAny :: NP (LedgerState -.-> LedgerState) (CardanoShelleyEras c)
980980
registerAny =
981-
hcmap (Proxy @ShelleyBasedBlock) injectIntoTestState $
981+
hcmap (Proxy @IsShelleyBlock) injectIntoTestState $
982982
WrapTransitionConfig transitionConfigShelley
983983
:* WrapTransitionConfig transitionConfigAllegra
984984
:* WrapTransitionConfig transitionConfigMary

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/Block.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
module Ouroboros.Consensus.Shelley.Ledger.Block (
1818
GetHeader (..)
1919
, Header (..)
20+
, IsShelleyBlock
2021
, NestedCtxt_ (..)
21-
, ShelleyBasedBlock
2222
, ShelleyBasedEra
2323
, ShelleyBlock (..)
2424
, ShelleyBlockLedgerEra
@@ -144,11 +144,11 @@ mkShelleyBlock raw = ShelleyBlock {
144144
class
145145
( ShelleyCompatible (BlockProtocol blk) (ShelleyBlockLedgerEra blk)
146146
, blk ~ ShelleyBlock (BlockProtocol blk) (ShelleyBlockLedgerEra blk)
147-
) => ShelleyBasedBlock blk
147+
) => IsShelleyBlock blk
148148

149149
instance ( proto ~ BlockProtocol (ShelleyBlock proto era)
150150
, ShelleyCompatible proto era
151-
) => ShelleyBasedBlock (ShelleyBlock proto era)
151+
) => IsShelleyBlock (ShelleyBlock proto era)
152152

153153
type family ShelleyBlockLedgerEra blk where
154154
ShelleyBlockLedgerEra (ShelleyBlock proto era) = era

ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser/Block/Cardano.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import Ouroboros.Consensus.Node.ProtocolInfo
7676
import Ouroboros.Consensus.Protocol.Praos.Translate ()
7777
import Ouroboros.Consensus.Shelley.HFEras ()
7878
import qualified Ouroboros.Consensus.Shelley.Ledger as Shelley.Ledger
79-
import Ouroboros.Consensus.Shelley.Ledger.Block (ShelleyBasedBlock,
79+
import Ouroboros.Consensus.Shelley.Ledger.Block (IsShelleyBlock,
8080
ShelleyBlock, ShelleyBlockLedgerEra)
8181
import Ouroboros.Consensus.Shelley.Ledger.SupportsProtocol ()
8282
import System.Directory (makeAbsolute)
@@ -236,15 +236,15 @@ instance Aeson.FromJSON CardanoConfig where
236236

237237
triggers <- do
238238
let parseTrigger ::
239-
forall blk era. (ShelleyBasedBlock blk, ShelleyBlockLedgerEra blk ~ era)
239+
forall blk era. (IsShelleyBlock blk, ShelleyBlockLedgerEra blk ~ era)
240240
=> (Aeson.Parser :.: K TriggerHardFork) blk
241241
parseTrigger = Comp $ fmap K $
242242
(fmap TriggerHardForkAtEpoch <$> (v Aeson..:? nm))
243243
Aeson..!= TriggerHardForkAtVersion (getVersion (L.eraProtVerLow @era))
244244
where
245245
nm = fromString $ "Test" <> L.eraName @era <> "HardForkAtEpoch"
246246

247-
triggers <- hsequence' $ hcpure (Proxy @ShelleyBasedBlock) parseTrigger
247+
triggers <- hsequence' $ hcpure (Proxy @IsShelleyBlock) parseTrigger
248248

249249
let isBad :: NP (K TriggerHardFork) xs -> Bool
250250
isBad = \case

0 commit comments

Comments
 (0)