From 7e6f9c49bfee228809e7807e81897e0d8b0c03ef Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Sat, 9 Nov 2024 05:10:16 +0100 Subject: [PATCH] Caplin: fixed validators refill for empty state snapshots (#12687) --- cl/antiquary/state_antiquary.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cl/antiquary/state_antiquary.go b/cl/antiquary/state_antiquary.go index b8f44621fde..c293d27583a 100644 --- a/cl/antiquary/state_antiquary.go +++ b/cl/antiquary/state_antiquary.go @@ -132,6 +132,9 @@ func FillStaticValidatorsTableIfNeeded(ctx context.Context, logger log.Logger, s if err := stateSn.OpenFolder(); err != nil { return false, err } + if stateSn.BlocksAvailable() == 0 { + return false, nil + } blocksAvaiable := stateSn.BlocksAvailable() stateSnRoTx := stateSn.View() defer stateSnRoTx.Close()