neoneo-go/pkg/rpc/server
Anna Shaleva edfca68a17 rpc: refactor invokecontractverify
In `(c *Client) AddNetworkFee` we define network fee for contract
witness verification via `invokecontractverify` RPC call, and that's the
initial purpose of this RPC method. But it was not implemented
correctly. It used `System.Contract.Call` instead of beheiving like
`initVerificationVM`.

During real contract witness verification the whole contract's script is
loaded into VM, and then we jump to the `verify` method. Thus, to define
exact contract verification price, we should act like this (and not just
perform `System.Contract.Call` of `verify` method).

Tests are added.

This bug is the reason of adding extra GAS (c.notary.extraVerifyFee) to
pre-calculated value in
https://github.com/nspcc-dev/neofs-node/pull/404/files#diff-639db437ca2578db46c9e8cbf18f9aa01f8ca5aee30e0fa7e70ba0354822d7b3R237
2021-03-12 18:59:20 +03:00
..
testdata rpc: refactor invokecontractverify 2021-03-12 18:59:20 +03:00
client_test.go rpc: refactor invokecontractverify 2021-03-12 18:59:20 +03:00
prometheus.go rpc: reuse handlers map for prometheus metrics 2020-03-25 15:25:12 +03:00
server.go rpc: refactor invokecontractverify 2021-03-12 18:59:20 +03:00
server_helper_test.go config: move notary module config to ApplicationConfiguration 2021-02-16 13:58:25 +03:00
server_test.go rpc: refactor invokecontractverify 2021-03-12 18:59:20 +03:00
subscription.go block: remove ConsensusData field 2021-03-10 13:38:44 +03:00
subscription_test.go block: remove ConsensusData field 2021-03-10 13:38:44 +03:00