Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Ord instance for TxIn #2586

Merged
merged 2 commits into from
Dec 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions libs/cardano-ledger-core/src/Cardano/Ledger/TxIn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,10 @@ pattern TxIn addr index <-

{-# COMPLETE TxIn #-}

-- | This instance is crafted to agreee with TxIn as the domain of SplitMap
instance Ord (TxIn crypto) where
compare (TxInCompact id1 n1) (TxInCompact id2 n2) =
case compare n1 n2 of
EQ -> compare id1 id2
other -> other

deriving instance Eq (TxIn crypto)

deriving instance Ord (TxIn crypto)

deriving instance Show (TxIn crypto)

deriving instance CC.Crypto crypto => NFData (TxIn crypto)
Expand Down