Skip to content

Commit 3916881

Browse files
committed
Use the first which is always the minimum
1 parent 5bc50e6 commit 3916881

File tree

1 file changed

+1
-6
lines changed
  • cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert

1 file changed

+1
-6
lines changed

cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/Grouped.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ insertBlockGroupedData syncEnv grouped = do
102102
lift $ DB.updateListTxOutConsumedByTxId $ catMaybes updateTuples
103103
void . lift . DB.insertManyTxMetadata $ groupedTxMetadata grouped
104104
void . lift . DB.insertManyTxMint $ groupedTxMint grouped
105-
pure $ DB.MinIds (minimumMaybe txInIds) (minimumMaybe txOutIds) (minimumMaybe maTxOutIds)
105+
pure $ DB.MinIds (listToMaybe txInIds) (listToMaybe txOutIds) (listToMaybe maTxOutIds)
106106
where
107107
tracer = getTrace syncEnv
108108

@@ -214,8 +214,3 @@ matches :: Generic.TxIn -> ExtendedTxOut -> Bool
214214
matches txIn eutxo =
215215
Generic.txInHash txIn == etoTxHash eutxo
216216
&& Generic.txInIndex txIn == DB.txOutIndex (etoTxOut eutxo)
217-
218-
minimumMaybe :: (Ord a, Foldable f) => f a -> Maybe a
219-
minimumMaybe xs
220-
| null xs = Nothing
221-
| otherwise = Just $ minimum xs

0 commit comments

Comments
 (0)