From c53b0645bbbca1646c4e6474b5aca6ba8fa93dc8 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 12 Dec 2024 18:51:52 +0300 Subject: [PATCH] core: extend NewBlockchain coverage a bit Signed-off-by: Roman Khimov --- pkg/core/blockchain_core_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/core/blockchain_core_test.go b/pkg/core/blockchain_core_test.go index 443c3a5d5..a35ee30f6 100644 --- a/pkg/core/blockchain_core_test.go +++ b/pkg/core/blockchain_core_test.go @@ -159,6 +159,11 @@ func TestNewBlockchainIncosistencies(t *testing.T) { c.ApplicationConfiguration.RemoveUntraceableHeaders = true }, storage.NewMemoryStore(), "RemoveUntraceableHeaders is enabled, but RemoveUntraceableBlocks is not") }) + t.Run("state exchange without state root", func(t *testing.T) { + checkNewBlockchainErr(t, func(c *config.Config) { + c.ProtocolConfiguration.P2PStateExchangeExtensions = true + }, storage.NewMemoryStore(), "P2PStatesExchangeExtensions are enabled, but StateRootInHeader is off") + }) } func TestBlockchain_InitWithIncompleteStateJump(t *testing.T) {