Skip to content

Commit

Permalink
Remove some redundant patterns and constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmayhew committed Nov 1, 2023
1 parent 085728e commit d49d938
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions cardano-node/src/Cardano/Node/LedgerEvent.hs
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,10 @@ toConwayEventShelley evt =
liftNewEpoch $ LedgerRestrainedRewards epoch rewards credentials
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.DeltaRewardEvent (RupdEvent epoch rewards))) ->
liftRewardUpdate $ LedgerIncrementalRewards epoch rewards
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.DeltaRewardEvent _)) ->
Nothing -- Or else getting "Pattern not exhaustif" warning, but can't seem to find the missing constructor.
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.EpochEvent (Conway.PoolReapEvent (RetiredPools refunded unclaimed epoch)))) ->
liftNewEpoch $ LedgerPoolReaping epoch refunded unclaimed
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.EpochEvent (Conway.SnapEvent (Shelley.StakeDistEvent stakeDist)))) ->
liftNewEpoch $ LedgerStakeDistEvent stakeDist
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.EpochEvent _)) ->
Nothing -- Or else getting "Pattern not exhaustif" warning, but can't seem to find the missing constructor.
ShelleyLedgerEventTICK (TickNewEpochEvent (Conway.TotalAdaPotsEvent adaPots)) ->
liftNewEpoch
$ LedgerTotalAdaPots
Expand Down
3 changes: 1 addition & 2 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/NodeToNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Network.TypedProtocol.Codec (AnyMessageAndAgency (..))
import Cardano.Node.Queries (ConvertTxId)
import Cardano.Node.Tracing.Render (renderHeaderHash, renderTxIdForDetails)

import Ouroboros.Consensus.Block (ConvertRawHash, GetHeader, StandardHash, getHeader)
import Ouroboros.Consensus.Block (ConvertRawHash, StandardHash, getHeader)
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTx, HasTxId, HasTxs,
LedgerSupportsMempool, extractTxs, txId)
import Ouroboros.Consensus.Node.Run (SerialiseNodeToNodeConstraints, estimateBlockSize)
Expand All @@ -36,7 +36,6 @@ import Ouroboros.Network.SizeInBytes (SizeInBytes (..))
--------------------------------------------------------------------------------

instance ( ConvertTxId blk
, GetHeader blk
, HasTxId (GenTx blk)
, SerialiseNodeToNodeConstraints blk
, HasTxs blk
Expand Down

0 comments on commit d49d938

Please sign in to comment.