Commit graph

5 commits

Author SHA1 Message Date
Roman Khimov
1e0750e3cd rpc: merge response and request under pkg/neorpc
Move result there also.
2022-07-25 11:57:53 +03:00
Anna Shaleva
a033b212a3 rpc: bump getversion compat
Version 0.98.5 is officially released with the old behaviour. The same thing
as #2479.
2022-05-16 06:59:23 +03:00
Roman Khimov
e7a0722849 rpc: bump getversion compat again
Version 0.98.4 is officially released with the old behaviour. The same thing
as #2472.
2022-05-12 10:37:56 +03:00
Roman Khimov
bb0efed8b7 rpc: move latest getversion compat to 0.98.3
Version 0.98.3 is officially released with the old behavior.
2022-05-07 22:34:40 +03:00
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