Skip to content

Commit

Permalink
Fix review suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
raduom committed Aug 8, 2022
1 parent 115a7ed commit 191d006
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -106,14 +106,14 @@ query ix txId' events = (<|>) <$> searchInMemory
searchOnDisk = do
txStatus :: [TxInfo]
<- SQL.query (ix ^. Ix.handle) "SELECT (txId, blockNo, slotNo) FROM tx_status WHERE txId = ?" (Only txId')
if null txStatus
then pure Nothing
else let (TxInfo _ bn _) = head txStatus
in pure . Just $
TxConfirmedState { timesConfirmed = Sum 0
, blockAdded = Last $ Just bn
, validity = Last $ Just TxValid
}
pure $ if null txStatus
then Nothing
else let (TxInfo _ bn _) = head txStatus
in Just $
TxConfirmedState { timesConfirmed = Sum 0
, blockAdded = Last $ Just bn
, validity = Last $ Just TxValid
}

store :: TCSIndex -> IO ()
store ix = do
Expand Down

0 comments on commit 191d006

Please sign in to comment.