neoneo-go/pkg/rpc
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
..
client fix typo's 2022-04-20 14:00:12 +02:00
request rpc: add Rules signer scope to request parameters 2022-03-03 12:18:19 +03:00
response rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
server rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
rpc_config.go rpc: add StartWhenSynchronized option, fix #2433 2022-04-26 00:31:48 +03:00