Skip to content

Commit

Permalink
Make default fallback reasons more explicit, fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
geo2a committed Jul 24, 2024
1 parent 9c82e4e commit 8c943d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion booster/tools/booster/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
<$> accumulatedLogs
)
r{ExecuteRequest.state = execStateToKoreJson simplifiedBoosterState}
-- if we stop for a reason in fallbackReasons (default [Aborted, Stuck, Branching],
-- if we stop for a reason in fallbackReasons (default [Aborted, Stuck],
-- revert to the old backend to re-confirm and possibly proceed
| boosterResult.reason `elem` cfg.fallbackReasons -> do
Booster.Log.withContext CtxProxy $
Expand Down
4 changes: 3 additions & 1 deletion booster/tools/booster/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ clProxyOptionsParser =
(eitherReader $ mapM reasonReader . splitOn ",")
( long "fallback-on"
<> metavar "REASON1,REASON2..."
<> value [Stuck, Aborted]
<> value defaultFallbackReasons
<> help "Halt reasons for which requests should be re-executed with kore-rpc"
<> showDefaultWith (intercalate "," . map show)
)
Expand All @@ -466,6 +466,8 @@ clProxyOptionsParser =
( long "no-fallback-simplify"
<> help "disable simplification before fallback requests"
)
defaultFallbackReasons :: [HaltReason]
defaultFallbackReasons = [Stuck, Aborted]

reasonReader :: String -> Either String HaltReason
reasonReader = \case
Expand Down

0 comments on commit 8c943d3

Please sign in to comment.