Conversation
It requires to compensate BlockHeight behaviour with persisting block. Details in row 538 https://github.com/nspcc-dev/neo-go/blob/44d7da54f41ce82d852cf7320d6ed00fb3c1eb96/pkg/core/interop/context.go#L528-L544 Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3494 +/- ##
=======================================
Coverage 23.46% 23.47%
=======================================
Files 669 669
Lines 50233 50233
=======================================
+ Hits 11785 11790 +5
+ Misses 37526 37523 -3
+ Partials 922 920 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
roman-khimov
left a comment
There was a problem hiding this comment.
Notice that netmap contract saves current Ledger index as "epoch block":
https://github.com/nspcc-dev/neofs-contract/blob/63a8deaafd21ce741d026e3e3973093596e41932/contracts/netmap/contract.go#L400
This means that an epoch ticking transaction added into block N will save N-1 as the time when epoch tick happened. Then verification context will use this N-1 as height and scripts (contracts) in RPC would get N-2 from Ledger. The patch corrects things as with N passed verification script would get N-1, same as epoch tick transaction.
It requires to compensate BlockHeight behaviour with persisting block. Details in row 538 https://github.com/nspcc-dev/neo-go/blob/44d7da54f41ce82d852cf7320d6ed00fb3c1eb96/pkg/core/interop/context.go#L528-L544