module Ouroboros.Consensus.Block.SupportsMetrics (
BlockSupportsMetrics (..)
, WhetherSelfIssued (..)
, isSelfIssuedConstUnknown
) where
import Ouroboros.Consensus.Block.Abstract
data WhetherSelfIssued =
IsSelfIssued
| IsNotSelfIssued
| UnknownSelfIssued
deriving (Int -> WhetherSelfIssued -> ShowS
[WhetherSelfIssued] -> ShowS
WhetherSelfIssued -> String
(Int -> WhetherSelfIssued -> ShowS)
-> (WhetherSelfIssued -> String)
-> ([WhetherSelfIssued] -> ShowS)
-> Show WhetherSelfIssued
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WhetherSelfIssued] -> ShowS
$cshowList :: [WhetherSelfIssued] -> ShowS
show :: WhetherSelfIssued -> String
$cshow :: WhetherSelfIssued -> String
showsPrec :: Int -> WhetherSelfIssued -> ShowS
$cshowsPrec :: Int -> WhetherSelfIssued -> ShowS
Show, WhetherSelfIssued -> WhetherSelfIssued -> Bool
(WhetherSelfIssued -> WhetherSelfIssued -> Bool)
-> (WhetherSelfIssued -> WhetherSelfIssued -> Bool)
-> Eq WhetherSelfIssued
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WhetherSelfIssued -> WhetherSelfIssued -> Bool
$c/= :: WhetherSelfIssued -> WhetherSelfIssued -> Bool
== :: WhetherSelfIssued -> WhetherSelfIssued -> Bool
$c== :: WhetherSelfIssued -> WhetherSelfIssued -> Bool
Eq)
class BlockSupportsMetrics blk where
isSelfIssued :: BlockConfig blk -> Header blk -> WhetherSelfIssued
isSelfIssuedConstUnknown :: BlockConfig blk -> Header blk -> WhetherSelfIssued
isSelfIssuedConstUnknown :: BlockConfig blk -> Header blk -> WhetherSelfIssued
isSelfIssuedConstUnknown BlockConfig blk
_cfg Header blk
_hdr = WhetherSelfIssued
UnknownSelfIssued