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 <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-06-04 20:48:12 +03:00
parent cc960d5a95
commit b2ac71e578

View file

@ -1070,7 +1070,7 @@ func (bc *Blockchain) isHardforkEnabled(hf *config.Hardfork, blockHeight uint32)
hfs := bc.config.Hardforks hfs := bc.config.Hardforks
if hf != nil { if hf != nil {
start, ok := hfs[hf.String()] start, ok := hfs[hf.String()]
if !ok || start < blockHeight { if !ok || start > blockHeight {
return false return false
} }
} }