We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe5508a + b8460b1 commit 4d416ffCopy full SHA for 4d416ff
cardano-api/src/Cardano/Api/Block.hs
@@ -341,6 +341,11 @@ data ChainPoint = ChainPointAtGenesis
341
| ChainPoint !SlotNo !(Hash BlockHeader)
342
deriving (Eq, Show)
343
344
+instance Ord ChainPoint where
345
+ compare ChainPointAtGenesis ChainPointAtGenesis = EQ
346
+ compare ChainPointAtGenesis _ = LT
347
+ compare _ ChainPointAtGenesis = GT
348
+ compare (ChainPoint sn _) (ChainPoint sn' _) = compare sn sn'
349
350
toConsensusPointInMode :: ConsensusMode mode
351
-> ChainPoint
0 commit comments