From 49e51a46fffaccf4763825fbcfffbc3ccc193b5a 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 d5e090044..a9fb80108 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 } }