neoneo-go/pkg/rpc/response/result
Anna Shaleva 9862b40f2c rpc: support InitialGasDistribution response from old Neo-Go nodes
https://github.com/nspcc-dev/neo-go/pull/2435 breaks compatibility
between newer RPC clients and older RPC servers with the following
error:
```
failed to get network magic: json: cannot unmarshal string into Go struct field Protocol.protocol.initialgasdistribution of type int64
```

This behaviour is expected, but we can't allow this radical change.
Thus, the following solution is implemented:
1. RPC server responds with proper non-stringified
   InitialGasDistribution value. The value represents an integral
   of fixed8 multiplied by the decimals.
2. RPC client is able to distinguish older and newer responses. For
   older one the stringified value without decimals part is
   expected. For newer responses the int64 value with decimal part
   is expected.

The cludge will be present in the code for a while until nodes of
version <=0.98.3 become completely absolete.
2022-04-27 19:00:46 +03:00
..
subscriptions rpc: move NotaryRequestEvent to the subscriptions pkg 2021-09-24 17:42:59 +03:00
application_log.go rpc: add trigger parameter to getapplicationlog 2020-11-12 17:43:11 +03:00
block.go rpc/result: drop unnecessary blockchainer dependency 2022-01-14 19:57:16 +03:00
block_header.go rpc/result: drop unnecessary blockchainer dependency 2022-01-14 19:57:16 +03:00
findstates.go rpc: implement findstates RPC handler 2021-10-13 11:41:05 +03:00
invoke.go rpc/storage: add storage changes to invoke* diagnostics 2022-01-19 00:02:19 +03:00
invoke_test.go rpc: add notifications into the invoke* result 2022-01-18 22:35:44 +03:00
mpt.go rpc: fix getstateheight result compatibility 2021-07-22 21:13:44 +03:00
mpt_test.go mpt: split HashNode in two types 2021-04-01 10:19:57 +03:00
netfee.go rpc: wrap calculatenetworkfee result in a structure 2021-06-04 23:38:35 +03:00
peers.go rpc: move result package into response 2020-02-21 15:12:04 +03:00
peers_test.go rpc: move result package into response 2020-02-21 15:12:04 +03:00
raw_mempool.go rpc: update getrawmempool RPC-call result 2020-07-29 10:14:01 +03:00
relay_result.go rpc: adjust sendrawtransaction RPC-call 2020-07-22 08:37:46 +03:00
tokens.go rpc: add client-side NEP-11 methods 2021-11-19 12:58:46 +03:00
tx_raw_output.go rpc/result: drop unnecessary blockchainer dependency 2022-01-14 19:57:16 +03:00
unclaimed_gas.go *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
validate_address.go rpc: move result package into response 2020-02-21 15:12:04 +03:00
validator.go core: switch to the new voting system (via native NEO contract) 2020-04-27 16:06:50 +03:00
version.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
version_test.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00