From a506d9296381d2667a606ed7f5a19e0c37f35c25 Mon Sep 17 00:00:00 2001 From: ifsantana Date: Fri, 14 Aug 2026 11:47:10 -0300 Subject: [PATCH] docs: clarify QuickNodeWebhookService checkpoint-advance comment (#257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "always advance checkpoint" comment didn't mention the one case where that's not true: when no SolanaChainReader is configured, processPayload() returns early and the checkpoint stays put — intentional (lets a later-configured reader recover the slot instead of skipping past it), and already covered by QuickNodeWebhookServiceTest. No behavior change. Signed-off-by: ifsantana --- .../idem/infrastructure/chain/QuickNodeWebhookService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructure/src/main/kotlin/finance/idem/infrastructure/chain/QuickNodeWebhookService.kt b/infrastructure/src/main/kotlin/finance/idem/infrastructure/chain/QuickNodeWebhookService.kt index f116670..9797c93 100644 --- a/infrastructure/src/main/kotlin/finance/idem/infrastructure/chain/QuickNodeWebhookService.kt +++ b/infrastructure/src/main/kotlin/finance/idem/infrastructure/chain/QuickNodeWebhookService.kt @@ -97,7 +97,9 @@ class QuickNodeWebhookService( } } - // Always advance checkpoint regardless of whether any transfer matched. + // Always advance checkpoint regardless of whether any transfer matched — but only + // once a SolanaChainReader is available to verify the slot (see the reader != null + // check above; without a reader this method returns early and the checkpoint stays put). // Prevents SolanaChainReader from re-scanning already-delivered slots on restart. val newCheckpoint = maxOf(existingCheckpoint, payload.slot) if (newCheckpoint > existingCheckpoint) {