Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 2e92160

Browse files
committed
Remove dead code (hashToUndo)
1 parent f13f99f commit 2e92160

File tree

1 file changed

+0
-15
lines changed
  • wallet-new/src/Cardano/Wallet/Kernel/Util

1 file changed

+0
-15
lines changed

wallet-new/src/Cardano/Wallet/Kernel/Util/Core.hs

-15
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ module Cardano.Wallet.Kernel.Util.Core (
2222
, txOuts
2323
, txIns
2424
, txAuxId
25-
-- * Blocks
26-
, hashToUndo
2725
) where
2826

2927
import Universum
@@ -35,12 +33,9 @@ import Data.Time.Clock.POSIX (getPOSIXTime)
3533
import Data.Time.Units (fromMicroseconds)
3634
import Serokell.Util (enumerate)
3735

38-
import Pos.Binary.Class (decodeFull')
39-
import qualified Pos.Chain.Block as Core
4036
import qualified Pos.Chain.Txp as Core
4137
import qualified Pos.Core as Core
4238
import Pos.Crypto.Hashing (hash)
43-
import Pos.DB.Class (SerializedUndo, unSerialized)
4439

4540
import Cardano.Wallet.Kernel.Util
4641

@@ -102,16 +97,6 @@ txIns = Set.fromList . NE.toList . Core._txInputs . Core.taTx
10297
txAuxId :: Core.TxAux -> Core.TxId
10398
txAuxId = hash . Core.taTx
10499

105-
{-------------------------------------------------------------------------------
106-
Blocks
107-
-------------------------------------------------------------------------------}
108-
109-
hashToUndo :: (Core.HeaderHash -> IO (Maybe SerializedUndo)) -> Core.HeaderHash -> IO (Maybe Core.Undo)
110-
hashToUndo getSerUndo hh = do
111-
getSerUndo hh <&> \case
112-
Nothing -> Nothing
113-
Just bytes -> (either (const Nothing) Just . decodeFull' . unSerialized) bytes
114-
115100
{-------------------------------------------------------------------------------
116101
External auxiliary
117102
-------------------------------------------------------------------------------}

0 commit comments

Comments
 (0)