Skip to content

Commit

Permalink
core: fix bug in (bc *Blockchain).isHardforkEnabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
AnnaShaleva committed Jul 15, 2024
1 parent cc960d5 commit b2ac71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit b2ac71e

Please sign in to comment.