rpc: change getunclaimed to getunclaimedgas
getunclaimed doesn't exist on Neo 3 and getunclaimedgas works for NEP5 GAS.
This commit is contained in:
parent
d856df36a7
commit
657bb7575e
10 changed files with 58 additions and 93 deletions
|
@ -507,7 +507,7 @@ var rpcTestCases = map[string][]rpcTestCase{
|
|||
fail: true,
|
||||
},
|
||||
},
|
||||
"getunclaimed": {
|
||||
"getunclaimedgas": {
|
||||
{
|
||||
name: "no params",
|
||||
params: "[]",
|
||||
|
@ -522,14 +522,13 @@ var rpcTestCases = map[string][]rpcTestCase{
|
|||
name: "positive",
|
||||
params: `["` + testchain.MultisigAddress() + `"]`,
|
||||
result: func(*executor) interface{} {
|
||||
return &result.Unclaimed{}
|
||||
var s string
|
||||
return &s
|
||||
},
|
||||
check: func(t *testing.T, e *executor, uncl interface{}) {
|
||||
res, ok := uncl.(*result.Unclaimed)
|
||||
check: func(t *testing.T, e *executor, resp interface{}) {
|
||||
s, ok := resp.(*string)
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, res.Available, util.Fixed8FromInt64(8))
|
||||
assert.True(t, res.Unavailable > 0)
|
||||
assert.Equal(t, res.Available+res.Unavailable, res.Unclaimed)
|
||||
assert.Equal(t, "1772", *s)
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue