From fadf8e59f2011fd0b75d6c4ba9896e186dd47ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Tue, 2 Jan 2024 16:19:19 +0100 Subject: [PATCH 1/2] fix check-blocks starting at block 0 --- cmd/fireantelope/tools_fix_invalid_utf8.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/fireantelope/tools_fix_invalid_utf8.go b/cmd/fireantelope/tools_fix_invalid_utf8.go index 86d16eb..0f8fb39 100644 --- a/cmd/fireantelope/tools_fix_invalid_utf8.go +++ b/cmd/fireantelope/tools_fix_invalid_utf8.go @@ -85,7 +85,10 @@ func createCheckBlocksE(logger *zap.Logger) firecore.CommandExecutor { i++ } - if i != 100 { + // We expect 100 blocks per merged block, unless it's the first merged block, then we only expect 98 as + // Antelope chains start at block 2. + if i != 100 && !(startBlock == 0 && i == 98) { + logger.Error("start_block", zap.Any("startBlock", startBlock)) return fmt.Errorf("expected to have read 100 blocks, we have read %d. Bailing out.", i) } From 394e036f7b3306b79279f93c1a746ff3e8f26857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Tue, 2 Jan 2024 16:22:09 +0100 Subject: [PATCH 2/2] remove log --- cmd/fireantelope/tools_fix_invalid_utf8.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/fireantelope/tools_fix_invalid_utf8.go b/cmd/fireantelope/tools_fix_invalid_utf8.go index 0f8fb39..92ec4a8 100644 --- a/cmd/fireantelope/tools_fix_invalid_utf8.go +++ b/cmd/fireantelope/tools_fix_invalid_utf8.go @@ -88,7 +88,6 @@ func createCheckBlocksE(logger *zap.Logger) firecore.CommandExecutor { // We expect 100 blocks per merged block, unless it's the first merged block, then we only expect 98 as // Antelope chains start at block 2. if i != 100 && !(startBlock == 0 && i == 98) { - logger.Error("start_block", zap.Any("startBlock", startBlock)) return fmt.Errorf("expected to have read 100 blocks, we have read %d. Bailing out.", i) }