neoneo-go/cli
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
..
cmdargs cli/smartcontract: allow to deploy contracts with scope 2021-10-13 15:55:42 +03:00
flags *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
input cli: allow to relay transaction on Enter 2021-12-09 19:14:01 +03:00
options cli: properly set default timeout for RPC flag 2022-03-25 16:14:04 +03:00
paramcontext *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
query cli: improve query tx usage text 2022-03-25 16:13:15 +03:00
server rpc: add StartWhenSynchronized option, fix #2433 2022-04-26 00:31:48 +03:00
smartcontract cli: update generate-wrapper usage text 2022-03-22 15:33:54 +01:00
testdata cli: add scope check tests for invocations 2021-11-22 12:46:42 +03:00
util cli/wallet: allow to testinvoke transaction before signing 2021-09-23 11:48:25 +03:00
vm vm: replace ishell with urfave/cli 2022-02-18 16:34:50 +03:00
wallet rpc: carefully review places where Client.cache.initDone is used 2022-02-22 12:52:14 +03:00
.gitignore Better error messages (#24) 2018-02-24 10:10:45 +01:00
candidate_test.go cli/wallet: show tx fee before relaying 2021-09-21 11:31:56 +03:00
contract_test.go *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
dump_test.go *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
executor_test.go rpc: support InitialGasDistribution response from old Neo-Go nodes 2022-04-27 19:00:46 +03:00
main.go cli: add query tx command, fix #2069 2021-07-20 18:03:50 +03:00
main_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
multisig_test.go cli: add tests for wallet-related commands 2022-02-02 13:48:12 +03:00
nep11_test.go *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
nep17_test.go cli: print zero balance of known token if token flag specified 2021-12-28 11:41:38 +03:00
options_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
query_test.go cli/wallet: allow to testinvoke transaction before signing 2021-09-23 11:48:25 +03:00
server_test.go *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
util_test.go cli: add tests for smartcontract-related commands 2022-02-02 11:28:29 +03:00
wallet_test.go vm: replace ishell with urfave/cli 2022-02-18 16:34:50 +03:00