Skip to content

Commit

Permalink
stylish
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Apr 30, 2024
1 parent 3f9a035 commit 07b404e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import Ouroboros.Consensus.Genesis.Governor (DensityBounds (..),
import Ouroboros.Consensus.MiniProtocol.ChainSync.Client
(TraceChainSyncClientEvent (..))
import Ouroboros.Consensus.MiniProtocol.ChainSync.Client.Jumping
(Instruction (..), JumpResult (..), JumpInstruction (..))
(Instruction (..), JumpInstruction (..), JumpResult (..))
import Ouroboros.Consensus.MiniProtocol.ChainSync.Client.State
(ChainSyncJumpingJumperState (..),
ChainSyncJumpingState (..), JumpInfo (..),
DynamoInitState (..))
ChainSyncJumpingState (..), DynamoInitState (..),
JumpInfo (..))
import Ouroboros.Consensus.Storage.ChainDB.API (LoE (..))
import qualified Ouroboros.Consensus.Storage.ChainDB.Impl as ChainDB
import Ouroboros.Consensus.Storage.ChainDB.Impl.Types
Expand Down Expand Up @@ -229,7 +229,7 @@ traceSchedulerEventTestBlockWith setTickTime tracer0 _tracer = \case
Dynamo initState lastJump ->
let showInitState = case initState of
DynamoStarting ji -> terseJumpInfo ji
DynamoStarted -> "Nothing"
DynamoStarted -> "Nothing"
in unwords ["Dynamo", showInitState, terseWithOrigin show lastJump]
Objector initState goodJumpInfo badPoint -> unwords
[ "Objector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ knownIntersectionStateTop cfgEnv dynEnv intEnv =
(ClientPipelinedStIdle Z)
offerJump mkPipelineDecision jump = Stateful $ \kis -> do
let jumpInfo = case jump of
Jumping.JumpTo ji -> ji
Jumping.JumpTo ji -> ji
Jumping.JumpToGoodPoint ji -> ji
dynamoTipPt = castPoint $ AF.headPoint $ jTheirFragment jumpInfo
traceWith tracer $ TraceOfferJump dynamoTipPt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ import Ouroboros.Consensus.MiniProtocol.ChainSync.Client.State
(ChainSyncClientHandle (..),
ChainSyncJumpingJumperState (..),
ChainSyncJumpingState (..), ChainSyncState (..),
JumpInfo (..),
DynamoInitState (..),
ObjectorInitState (..),
DisengagedInitState (..))
DisengagedInitState (..), DynamoInitState (..),
JumpInfo (..), ObjectorInitState (..))
import Ouroboros.Consensus.Util.IOLike hiding (handle)
import qualified Ouroboros.Network.AnchoredFragment as AF

Expand Down Expand Up @@ -759,7 +757,7 @@ electNewDynamo context = do
findNonDisengaged =
findM $ \(_, st) -> not . isDisengaged <$> readTVar (cschJumping st)
isDisengaged Disengaged{} = True
isDisengaged _ = False
isDisengaged _ = False

findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)
findM _ [] = pure Nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ module Ouroboros.Consensus.MiniProtocol.ChainSync.Client.State (
, ChainSyncJumpingJumperState (..)
, ChainSyncJumpingState (..)
, ChainSyncState (..)
, JumpInfo (..)
, DisengagedInitState (..)
, DynamoInitState (..)
, JumpInfo (..)
, ObjectorInitState (..)
, DisengagedInitState (..)
) where

import Cardano.Slotting.Slot (SlotNo, WithOrigin)
Expand Down

0 comments on commit 07b404e

Please sign in to comment.