Skip to content

Commit

Permalink
add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Oct 4, 2023
1 parent bf6eb1b commit 0fcdd02
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions checkpoint/client/rest/query_milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func milestoneLatestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down Expand Up @@ -65,6 +66,7 @@ func milestoneCountHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down Expand Up @@ -111,6 +113,7 @@ func milestoneByNumberHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down Expand Up @@ -150,6 +153,7 @@ func latestNoAckMilestoneHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down Expand Up @@ -196,6 +200,7 @@ func noAckMilestoneByIDHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down Expand Up @@ -242,6 +247,7 @@ func milestoneByIDHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {

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

return
Expand Down

0 comments on commit 0fcdd02

Please sign in to comment.