From 141ef5d8ce630298c4a06b4aa22c2a5436167072 Mon Sep 17 00:00:00 2001 From: Carlton N Hanna Date: Tue, 20 Aug 2024 13:04:36 -0600 Subject: [PATCH] add logs for retry --- .../explorer/service/async/AsyncCachingV2.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt index c29a76a2..25c92745 100644 --- a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt +++ b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt @@ -161,6 +161,9 @@ class AsyncCachingV2( if (blockRes == null) return null logger.info("saving block ${blockRes.block.height()}") val blockTimestamp = blockRes.block.header.time.toDateTime() + if (rerunTxs.second) { + logger.info("attempting to build insert for block cache for block ${blockRes.block.height()}") + } val block = BlockCacheRecord.buildInsert( blockRes.block.height(), @@ -168,10 +171,21 @@ class AsyncCachingV2( blockTimestamp, blockRes ) + if (rerunTxs.second) { + logger.info("attempting to build proposer insert for block ${blockRes.block.height()}") + } val proposerRec = validatorService.buildProposerInsert(blockRes, blockTimestamp, blockRes.block.height()) + if (rerunTxs.second) { + logger.info("attempting to query validator at height for block ${blockRes.block.height()}") + } val valsAtHeight = validatorService.buildValidatorsAtHeight(blockRes.block.height()) + if (rerunTxs.second) { + logger.info("attempting to calculate missing blocks for block ${blockRes.block.height()}") + } validatorService.saveMissedBlocks(blockRes) - logger.info("attempting to save txs ${blockRes.block.data.txsCount} for block ${blockRes.block.height()}") + if (rerunTxs.second) { + logger.info("attempting to save txs ${blockRes.block.data.txsCount} for block ${blockRes.block.height()}") + } val txs = if (blockRes.block.data.txsCount > 0) { saveTxs(