neoneo-go/pkg/rpc/server
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
..
testdata rpc: regenerate basic chain and adjust RPC server tests 2022-03-30 11:32:30 +03:00
client_test.go rpc/server: make Server conform network.Service interface 2022-04-22 10:49:06 +03:00
prometheus.go rpc/server: register ws calls in Prometheus 2022-03-21 23:18:00 +03:00
server.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
server_helper_test.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
server_test.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
subscription.go rpc: move NotaryRequestEvent to the subscriptions pkg 2021-09-24 17:42:59 +03:00
subscription_test.go rpc/server: make Server conform network.Service interface 2022-04-22 10:49:06 +03:00
tokens.go rpc: add server-side NEP-11 tracking API 2021-11-19 12:58:46 +03:00
util.go rpc, internal: fix CodeQL int conversions warnings 2021-04-19 11:30:28 +03:00