From b5aeff87ca0147552e22de1f5f6fe00ae9a2c184 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Thu, 6 Jun 2019 13:03:32 +0200 Subject: [PATCH] remove unused 'DummyState' and its 'PersistState' instance --- lib/core/src/Cardano/Wallet/DB/Sqlite.hs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/core/src/Cardano/Wallet/DB/Sqlite.hs b/lib/core/src/Cardano/Wallet/DB/Sqlite.hs index 471c68c34b4..a3dbfeb96d5 100644 --- a/lib/core/src/Cardano/Wallet/DB/Sqlite.hs +++ b/lib/core/src/Cardano/Wallet/DB/Sqlite.hs @@ -1,6 +1,5 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} @@ -19,7 +18,6 @@ module Cardano.Wallet.DB.Sqlite ( newDBLayer , PersistState (..) - , DummyState(..) ) where import Prelude @@ -121,8 +119,6 @@ import Database.Persist.Sqlite ( SqlBackend, SqlPersistM, SqlPersistT, wrapConnection ) import Database.Sqlite ( Error (ErrorConstraint), SqliteException (SqliteException) ) -import GHC.Generics - ( Generic ) import System.IO ( stderr ) import System.Log.FastLogger @@ -767,12 +763,3 @@ selectSeqStatePendingIxs ssid = [Desc SeqStatePendingIxIndex] where fromRes = fmap (W.Index . seqStatePendingIxIndex . entityVal) - -data DummyState = DummyState - deriving (Show, Eq, Generic) - -instance PersistState DummyState where - insertState (wid, sl) _ = insert_ (SeqState wid sl) - selectState (wid, sl) = fmap (const DummyState) <$> - selectFirst [SeqStateTableWalletId ==. wid, SeqStateTableCheckpointSlot ==. sl] [] - deleteState wid = deleteWhere [SeqStateTableWalletId ==. wid]