Skip to content

Commit

Permalink
update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Aug 20, 2024
1 parent 1f7242a commit fb89445
Showing 1 changed file with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,7 @@ import io.provenance.explorer.domain.entities.ValidatorStateRecord
import io.provenance.explorer.domain.entities.ValidatorsCacheRecord
import io.provenance.explorer.domain.entities.updateHitCount
import io.provenance.explorer.domain.exceptions.requireNotNullToMessage
import io.provenance.explorer.domain.extensions.average
import io.provenance.explorer.domain.extensions.avg
import io.provenance.explorer.domain.extensions.get24HrBlockHeight
import io.provenance.explorer.domain.extensions.pageCountOfResults
import io.provenance.explorer.domain.extensions.sigToAddress
import io.provenance.explorer.domain.extensions.sigToBase64
import io.provenance.explorer.domain.extensions.toCoinStr
import io.provenance.explorer.domain.extensions.toDateTime
import io.provenance.explorer.domain.extensions.toDecimal
import io.provenance.explorer.domain.extensions.toDecimalStringOld
import io.provenance.explorer.domain.extensions.toOffset
import io.provenance.explorer.domain.extensions.toPercentage
import io.provenance.explorer.domain.extensions.toPercentageOld
import io.provenance.explorer.domain.extensions.translateAddress
import io.provenance.explorer.domain.extensions.translateByteArray
import io.provenance.explorer.domain.extensions.validatorMissedBlocks
import io.provenance.explorer.domain.extensions.validatorUptime
import io.provenance.explorer.domain.extensions.*

Check failure on line 26 in service/src/main/kotlin/io/provenance/explorer/service/ValidatorService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Wildcard import (cannot be auto-corrected)
import io.provenance.explorer.domain.models.explorer.BlockProposer
import io.provenance.explorer.domain.models.explorer.CurrentValidatorState
import io.provenance.explorer.domain.models.explorer.hourlyBlockCount
Expand Down Expand Up @@ -507,15 +491,15 @@ class ValidatorService(
var currentVals = ValidatorsCacheRecord.findById(lastBlockHeight)?.validators
if (currentVals == null) {
if (log) {
logger.info("Fetching validators from gRPC client for height: $lastBlockHeight")
logger.info("Fetching validators from gRPC client for height: $lastBlockHeight for block: $blockHeight")
}
currentVals = grpcClient.getValidatorsAtHeight(lastBlockHeight)
}

currentVals.validatorsList.forEach { validator ->
if (!signatures.contains(validator.address)) {
if (log) {
logger.info("Validator ${validator.address} missed block at height: $lastBlockHeight")
logger.info("Validator ${validator.address} missed block at height: $lastBlockHeight for block: $blockHeight")
}
MissedBlocksRecord.insert(lastBlockHeight, validator.address)
}
Expand Down

0 comments on commit fb89445

Please sign in to comment.