Commit 38d91fc
authored
Native: properly activate native methods/events (#4524)
#4520 fixes false-positive
activation in case if DeprecatedIn hardfork is passed. However,
it's not enough for proper ActiveIn work because there's a case of
false-positive activation in case if both DeprecatedIn and ActiveIn
hardforks are not yet passed.
This commit rewrites ActiveIn condition: the method/event IS active if
and only if ActiveIn hardfork IS active AND DeprecatedIn hardfork IS NOT
active. ActiveIn hardfork IS active if it's null OR it's already passed.
DeprecatedIn hardfork IS NOT active if it's null OR it's not yet passed.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>1 parent f7bc967 commit 38d91fc
2 files changed
Lines changed: 4 additions & 6 deletions
File tree
- src/Neo/SmartContract/Native
- tests/Neo.UnitTests/SmartContract/Native
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 228 | + | |
| 229 | + | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
0 commit comments