From b2ac71e578b2aca028f5a47490b674b27b224fc9 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 4 Jun 2024 20:48:12 +0300 Subject: [PATCH] core: fix bug in (bc *Blockchain).isHardforkEnabled This code was never invoked since we had no native contract enabled starting from some hardfork, Notary is the first one. And luckily, we have plenty of tests that fail due to this bug. Signed-off-by: Anna Shaleva --- pkg/core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 93c98577e..9c6c87673 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1070,7 +1070,7 @@ func (bc *Blockchain) isHardforkEnabled(hf *config.Hardfork, blockHeight uint32) hfs := bc.config.Hardforks if hf != nil { start, ok := hfs[hf.String()] - if !ok || start < blockHeight { + if !ok || start > blockHeight { return false } }