Merge pull request #1169 from nspcc-dev/neo3/rpc/fields_names_adjustment

rpc: adjust RPC calls JSON fields
This commit is contained in:
Roman Khimov 2020-07-15 18:24:54 +03:00 committed by GitHub
commit f46ed798f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 176 additions and 114 deletions

View file

@ -560,13 +560,16 @@ var rpcTestCases = map[string][]rpcTestCase{
name: "positive",
params: `["` + testchain.MultisigAddress() + `"]`,
result: func(*executor) interface{} {
var s string
return &s
return &result.UnclaimedGas{}
},
check: func(t *testing.T, e *executor, resp interface{}) {
s, ok := resp.(*string)
actual, ok := resp.(*result.UnclaimedGas)
require.True(t, ok)
assert.Equal(t, "36000", *s)
expected := result.UnclaimedGas{
Address: testchain.MultisigScriptHash(),
Unclaimed: *big.NewInt(36000),
}
assert.Equal(t, expected, *actual)
},
},
},