From 57ac9cb39f5c1ba19eb0462522ddf060165da8d9 Mon Sep 17 00:00:00 2001 From: rotilho Date: Thu, 19 Mar 2026 10:38:34 +0100 Subject: [PATCH] Add early exit for non-historical nodes in `VoteKeeper.keep` --- src/main/kotlin/cash/atto/node/vote/keeping/VoteKeeper.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/cash/atto/node/vote/keeping/VoteKeeper.kt b/src/main/kotlin/cash/atto/node/vote/keeping/VoteKeeper.kt index 13acedec..25de6d41 100644 --- a/src/main/kotlin/cash/atto/node/vote/keeping/VoteKeeper.kt +++ b/src/main/kotlin/cash/atto/node/vote/keeping/VoteKeeper.kt @@ -92,6 +92,10 @@ class VoteKeeper( @Scheduled(fixedRate = 10, timeUnit = TimeUnit.MINUTES) suspend fun keep() { + if (!thisNode.isHistorical()) { + return + } + val minimalWeight = voteWeighter.getMinimalConfirmationWeight() val missingVote = voteRepository.findMissingVote(minimalWeight.raw.toBigInteger())