Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup to Mempool #2721

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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