@@ -66,7 +66,7 @@ import qualified Data.Foldable as Foldable
6666import Data.List.NonEmpty (NonEmpty (.. ), nonEmpty )
6767import qualified Data.List.NonEmpty as NonEmpty
6868import qualified Data.Map as M
69- import Data.Time.Units (Second , fromMicroseconds , toMicroseconds )
69+ import Data.Time.Units (fromMicroseconds , toMicroseconds )
7070import Database.Beam.Migrate (CheckedDatabaseSettings , DataType (.. ),
7171 Migration , MigrationSteps , boolean , collectChecks ,
7272 createTable , evaluateDatabase , executeMigration , field ,
@@ -79,7 +79,6 @@ import Cardano.Wallet.Kernel.DB.TxMeta.Types (AccountFops (..),
7979 FilterOperation (.. ), Limit (.. ), Offset (.. ),
8080 SortCriteria (.. ), SortDirection (.. ), Sorting (.. ))
8181import qualified Cardano.Wallet.Kernel.DB.TxMeta.Types as Kernel
82- import Cardano.Wallet.WalletLayer.ExecutionTimeLimit
8382
8483import qualified Pos.Chain.Txp as Txp
8584import qualified Pos.Core as Core
@@ -600,7 +599,7 @@ getTxMetas conn (Offset offset) (Limit limit) accountFops mbAddress fopTxId fopT
600599 Left e -> throwIO $ Kernel. StorageFailure (toException e)
601600 Right Nothing -> return ([] , Just 0 )
602601 Right (Just (meta, inputs, outputs)) -> do
603- eiCount <- limitExecutionTimeTo ( 25 :: Second ) ( \ _ -> () ) $ ignoreLeft $ Sqlite. runDBAction $ runBeamSqlite conn $
602+ eiCount <- Sqlite. runDBAction $ runBeamSqlite conn $
604603 case mbAddress of
605604 Nothing -> SQL. runSelectReturningOne $ SQL. select metaQueryC
606605 Just addr -> SQL. runSelectReturningOne $ SQL. select $ metaQueryWithAddrC addr
@@ -613,13 +612,6 @@ getTxMetas conn (Offset offset) (Limit limit) accountFops mbAddress fopTxId fopT
613612 return (txMeta, count)
614613
615614 where
616- ignoreLeft :: IO (Either a b ) -> IO (Either () b )
617- ignoreLeft m = do
618- x <- m
619- case x of
620- Left _ -> return $ Left ()
621- Right r -> return $ Right r
622-
623615 filters meta = do
624616 SQL. guard_ $ filterAccs meta accountFops
625617 SQL. guard_ $ applyFilter (_txMetaTableId meta) fopTxId
0 commit comments