Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Oct 5, 2023
1 parent 552ce9b commit ea6b57c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions checkpoint/client/rest/query_milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ func milestoneLatestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

RestLogger.Info("***** fetching latest milestone", "height", cliCtx.Height)
// Fetch latest milestone
result, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryLatestMilestone), nil)
RestLogger.Info("***** fetching latest milestone", "height", height)

// Return status code 503 (Service Unavailable) if HF hasn't been activated
if cliCtx.Height < helper.GetAalborgHardForkHeight() {
if height < helper.GetAalborgHardForkHeight() {
RestLogger.Info("***** Aalborg hardfork not activated yet *****", "url", r.URL)
hmRest.WriteErrorResponse(w, http.StatusServiceUnavailable, "Aalborg hardfork not activated yet")

return
}

// Fetch latest milestone
result, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryLatestMilestone), nil)
if err != nil {
hmRest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error())

Expand Down
2 changes: 1 addition & 1 deletion helper/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func InitHeimdallConfigWith(homeDir string, heimdallConfigFileFromFLag string) {
newSelectionAlgoHeight = 0
spanOverrideHeight = 0
newHexToStringAlgoHeight = 0
aalborgHeight = 200
aalborgHeight = 70
}
}

Expand Down

0 comments on commit ea6b57c

Please sign in to comment.