Skip to content

Commit

Permalink
Merge pull request #2721 from input-output-hk/lehins/minor-mempool-cl…
Browse files Browse the repository at this point in the history
…eanup

Minor cleanup to Mempool
  • Loading branch information
nc6 authored Apr 4, 2022
2 parents d484397 + c92fd21 commit 1a50dac
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Mempool.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
Expand Down Expand Up @@ -132,13 +130,6 @@ class
MempoolState era ->
Core.Tx era ->
m (MempoolState era, Validated (Core.Tx era))
default applyTx ::
MonadError (ApplyTxError era) m =>
Globals ->
MempoolEnv era ->
MempoolState era ->
Core.Tx era ->
m (MempoolState era, Validated (Core.Tx era))
applyTx globals env state tx =
let res =
flip runReader globals
Expand Down Expand Up @@ -167,13 +158,6 @@ class
MempoolState era ->
Validated (Core.Tx era) ->
m (MempoolState era)
default reapplyTx ::
MonadError (ApplyTxError era) m =>
Globals ->
MempoolEnv era ->
MempoolState era ->
Validated (Core.Tx era) ->
m (MempoolState era)
reapplyTx globals env state (Validated tx) =
let res =
flip runReader globals
Expand Down Expand Up @@ -254,8 +238,7 @@ instance

-- | Old 'applyTxs'
applyTxs ::
ApplyTx era =>
MonadError (ApplyTxError era) m =>
(ApplyTx era, MonadError (ApplyTxError era) m) =>
Globals ->
SlotNo ->
Seq (Core.Tx era) ->
Expand Down Expand Up @@ -289,7 +272,7 @@ applyTxsTransition globals env txs state =
-- | Transform a function over mempool states to one over the full
-- 'NewEpochState'.
overNewEpochState ::
Applicative f =>
Functor f =>
(MempoolState era -> f (MempoolState era)) ->
NewEpochState era ->
f (NewEpochState era)
Expand Down

0 comments on commit 1a50dac

Please sign in to comment.