{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.Ledger.Shelley.SoftForks (
  validMetadata,
  restrictPoolMetadataHash,
)
where

import Cardano.Ledger.BaseTypes (ProtVer (..), natVersion)

validMetadata ::
  ProtVer ->
  Bool
validMetadata :: ProtVer -> Bool
validMetadata ProtVer
pv = ProtVer
pv forall a. Ord a => a -> a -> Bool
> Version -> Natural -> ProtVer
ProtVer (forall (v :: Natural).
(KnownNat v, MinVersion <= v, v <= MaxVersion) =>
Version
natVersion @2) Natural
0

restrictPoolMetadataHash ::
  ProtVer ->
  Bool
restrictPoolMetadataHash :: ProtVer -> Bool
restrictPoolMetadataHash ProtVer
pv = ProtVer
pv forall a. Ord a => a -> a -> Bool
> Version -> Natural -> ProtVer
ProtVer (forall (v :: Natural).
(KnownNat v, MinVersion <= v, v <= MaxVersion) =>
Version
natVersion @4) Natural
0