Skip to content

Commit

Permalink
Rename runGdd to runGDDGovernor
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed May 7, 2024
1 parent e617ed3 commit 896f182
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Config (TopLevelConfig (..))
import Ouroboros.Consensus.Genesis.Governor (runGdd,
import Ouroboros.Consensus.Genesis.Governor (runGDDGovernor,
updateLoEFragGenesis)
import Ouroboros.Consensus.Ledger.SupportsProtocol
(LedgerSupportsProtocol)
Expand Down Expand Up @@ -371,7 +371,7 @@ startNode schedulerConfig genesisTest interval = do
gddTrigger = viewChainSyncState handles (\ s -> (csLatestSlot s, csIdling s))
for_ lrLoEVar $ \ var -> do
forkLinkedThread lrRegistry "LoE updater background" $
void $ runGdd gdd var lnChainDb gddTrigger
void $ runGDDGovernor gdd var lnChainDb gddTrigger
where
LiveResources {lrRegistry, lrTracer, lrConfig, lrPeerSim, lrLoEVar} = resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-- peers allows the current selection to advance. See
-- 'Ouroboros.Consensus.Storage.ChainDB.API.LoE' for more details.
--
-- The GDD governor, invoked with 'runGdd', is supposed to run in a background
-- The GDD governor, invoked with 'runGDDGovernor', is supposed to run in a background
-- thread. It evaluates candidate chains whenever they change, or whenever a
-- peer claims to have no more headers, or whenever a peer starts sending
-- headers beyond the forecast horizon.
Expand All @@ -34,7 +34,7 @@ module Ouroboros.Consensus.Genesis.Governor (
, TraceGDDEvent (..)
, UpdateLoEFrag (..)
, densityDisconnect
, runGdd
, runGDDGovernor
, sharedCandidatePrefix
, updateLoEFragGenesis
, updateLoEFragUnconditional
Expand Down Expand Up @@ -132,14 +132,14 @@ sharedCandidatePrefix curChain candidates =
-- computed by @loEUpdater@ to @varLoEFrag@, and then triggering
-- ChainSel to reprocess all blocks that had previously been
-- postponed by the LoE.
runGdd ::
runGDDGovernor ::
(Monoid a, Eq a, IOLike m, LedgerSupportsProtocol blk) =>
UpdateLoEFrag m blk ->
StrictTVar m (AnchoredFragment (Header blk)) ->
ChainDB m blk ->
STM m a ->
m Void
runGdd loEUpdater varLoEFrag chainDb getTrigger =
runGDDGovernor loEUpdater varLoEFrag chainDb getTrigger =
spin mempty
where
spin oldTrigger = do
Expand Down

0 comments on commit 896f182

Please sign in to comment.