diff --git a/service/src/main/kotlin/io/provenance/explorer/service/ValidatorService.kt b/service/src/main/kotlin/io/provenance/explorer/service/ValidatorService.kt index af500978..bb8ef676 100644 --- a/service/src/main/kotlin/io/provenance/explorer/service/ValidatorService.kt +++ b/service/src/main/kotlin/io/provenance/explorer/service/ValidatorService.kt @@ -542,15 +542,6 @@ class ValidatorService( } } -// fun getBlockLatencyData(address: String, blockCount: Int) = -// getValidatorOperatorAddress(address)?.let { addr -> -// BlockProposerRecord.getRecordsForProposer(addr.operatorAddress, blockCount).let { res -> -// val average = res.map { it.blockLatency!! }.average() -// val data = res.associate { it.blockHeight to it.blockLatency!! } -// BlockLatencyData(addr.operatorAddress, data, average) -// } -// } ?: throw ResourceNotFoundException("Invalid validator address: '$address'") - private fun getLatestHeight() = SpotlightCacheRecord.getSpotlight()?.latestBlock?.height ?: blockService.getMaxBlockCacheHeight() fun getDistinctValidatorsWithMissedBlocksInTimeframe(timeframe: Timeframe) = transaction { diff --git a/service/src/main/kotlin/io/provenance/explorer/web/v2/ValidatorControllerV2.kt b/service/src/main/kotlin/io/provenance/explorer/web/v2/ValidatorControllerV2.kt index fc604a18..df242ff6 100644 --- a/service/src/main/kotlin/io/provenance/explorer/web/v2/ValidatorControllerV2.kt +++ b/service/src/main/kotlin/io/provenance/explorer/web/v2/ValidatorControllerV2.kt @@ -165,17 +165,6 @@ class ValidatorControllerV2( dayCount: Int ) = validatorService.getValidatorMarketRateStats(address, fromDate, toDate, dayCount) -// @ApiOperation("Returns block latency data for the validator") -// @GetMapping("/{address}/latency") -// fun blockLatency( -// @ApiParam(value = "The Validator's operator, owning account, or consensus address") -// @PathVariable -// address: String, -// @ApiParam(value = "The number of blocks of data returned", defaultValue = "100", required = false) -// @RequestParam(defaultValue = "100") -// blockCount: Int -// ) = validatorService.getBlockLatencyData(address, blockCount) - @ApiOperation("Returns distinct validators with missed blocks for the timeframe") @GetMapping("/missed_blocks/distinct") fun missedBlocksDistinct(