Skip to content

Commit

Permalink
fixed copy paste issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Aug 1, 2023
1 parent fcb81fe commit 55142ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions handlers/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ func Validator(w http.ResponseWriter, r *http.Request) {
}
}

func getValidatorPageData(validatorIndex uint64) *models.EpochPageData {
pageData := &models.EpochPageData{}
func getValidatorPageData(validatorIndex uint64) *models.ValidatorPageData {
pageData := &models.ValidatorPageData{}
pageCacheKey := fmt.Sprintf("validator:%v", validatorIndex)
pageData = services.GlobalFrontendCache.ProcessCachedPage(pageCacheKey, true, pageData, func(pageCall *services.FrontendCacheProcessingPage) interface{} {
pageData, cacheTimeout := buildValidatorPageData(validatorIndex)
pageCall.CacheTimeout = cacheTimeout
return pageData
}).(*models.EpochPageData)
}).(*models.ValidatorPageData)
return pageData
}

Expand Down
6 changes: 3 additions & 3 deletions handlers/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ func Validators(w http.ResponseWriter, r *http.Request) {
}
}

func getValidatorsPageData(firstValIdx uint64, pageSize uint64, stateFilter string) *models.EpochPageData {
pageData := &models.EpochPageData{}
func getValidatorsPageData(firstValIdx uint64, pageSize uint64, stateFilter string) *models.ValidatorsPageData {
pageData := &models.ValidatorsPageData{}
pageCacheKey := fmt.Sprintf("validators:%v:%v:%v", firstValIdx, pageSize, stateFilter)
pageData = services.GlobalFrontendCache.ProcessCachedPage(pageCacheKey, true, pageData, func(pageCall *services.FrontendCacheProcessingPage) interface{} {
pageData, cacheTimeout := buildValidatorsPageData(firstValIdx, pageSize, stateFilter)
pageCall.CacheTimeout = cacheTimeout
return pageData
}).(*models.EpochPageData)
}).(*models.ValidatorsPageData)
return pageData
}

Expand Down

0 comments on commit 55142ae

Please sign in to comment.