From fd99d3954af8efc2e6a475d15d8c9a56aa988130 Mon Sep 17 00:00:00 2001 From: Bryan Potter Date: Mon, 25 Nov 2024 10:59:50 -0700 Subject: [PATCH] add nil check --- asserter/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asserter/block.go b/asserter/block.go index 9131e159..63fe2a23 100644 --- a/asserter/block.go +++ b/asserter/block.go @@ -598,7 +598,7 @@ func (a *Asserter) Block( // Only apply duplicate hash and index checks if the block index is not the // genesis index. - if a.genesisBlock.Index != block.BlockIdentifier.Index { + if a.genesisBlock == nil || a.genesisBlock.Index != block.BlockIdentifier.Index { if block.BlockIdentifier.Hash == block.ParentBlockIdentifier.Hash { return ErrBlockHashEqualsParentBlockHash }