Skip to content

Commit

Permalink
Reset retry state when transition between LedgerStateJudgements
Browse files Browse the repository at this point in the history
The bootstrap peers and public root peers should be different. Therefor
the failure of one kind shouldn't automatically carry over to the other
kind.
  • Loading branch information
karknu authored and coot committed May 7, 2024
1 parent 0be1b0b commit 34fa46e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ monitorLedgerStateJudgement PeerSelectionActions{ readLedgerStateJudgement }
, localRootPeers = LocalRootPeers.empty
, hasOnlyBootstrapPeers = False
, bootstrapPeersTimeout = Just (addTime governor_BOOTSTRAP_PEERS_TIMEOUT now)
, publicRootBackoffs = 0
, publicRootRetryTime = now
})
YoungEnough -> do
let nonEstablishedBootstrapPeers =
Expand All @@ -612,7 +614,7 @@ monitorLedgerStateJudgement PeerSelectionActions{ readLedgerStateJudgement }
EstablishedPeers.toSet establishedPeers
Set.\\
(inProgressPromoteCold <> inProgressPromoteWarm)
return (\_ -> st
return (\now -> st
{ ledgerStateJudgement = lsj
, hasOnlyBootstrapPeers = False
, bootstrapPeersTimeout = Nothing
Expand All @@ -624,6 +626,8 @@ monitorLedgerStateJudgement PeerSelectionActions{ readLedgerStateJudgement }
PublicRootPeers.difference
publicRootPeers
nonEstablishedBootstrapPeers
, publicRootBackoffs = 0
, publicRootRetryTime = now
})
return $ \now ->
Decision {
Expand Down

0 comments on commit 34fa46e

Please sign in to comment.