rpc: drop getaccountstate method

It's not relevant for Neo 3.
This commit is contained in:
Roman Khimov 2020-06-02 00:26:37 +03:00
parent 657bb7575e
commit c6ae954e4e
8 changed files with 9 additions and 161 deletions

View file

@ -146,32 +146,6 @@ func getResultBlock202() *result.Block {
// published in official C# JSON-RPC API v2.10.3 reference
// (see https://docs.neo.org/docs/en-us/reference/rpc/latest-version/api.html)
var rpcClientTestCases = map[string][]rpcClientTestCase{
"getaccountstate": {
{
name: "positive",
invoke: func(c *Client) (interface{}, error) {
return c.GetAccountState("")
},
serverResponse: `{"jsonrpc":"2.0","id": 1,"result":{"version":0,"script_hash":"0x1179716da2e9523d153a35fb3ad10c561b1e5b1a","frozen":false,"votes":[],"balances":[{"asset":"0x1a5e0e3eac2abced7de9ee2de0820a5c85e63756fcdfc29b82fead86a7c07c78","value":"94"}]}}`,
result: func(c *Client) interface{} {
scriptHash, err := util.Uint160DecodeStringLE("1179716da2e9523d153a35fb3ad10c561b1e5b1a")
if err != nil {
panic(err)
}
return &result.AccountState{
Version: 0,
ScriptHash: scriptHash,
IsFrozen: false,
Balances: result.Balances{
result.Balance{
Asset: core.GoverningTokenID(),
Value: util.Fixed8FromInt64(94),
},
},
}
},
},
},
"getapplicationlog": {
{
name: "positive",
@ -920,12 +894,6 @@ var rpcClientErrorCases = map[string][]rpcClientErrorCase{
},
},
`{"id":1,"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid Params"}}`: {
{
name: "getaccountstate_invalid_params_error",
invoke: func(c *Client) (i interface{}, err error) {
return c.GetAccountState("")
},
},
{
name: "getapplicationlog_invalid_params_error",
invoke: func(c *Client) (interface{}, error) {
@ -1072,12 +1040,6 @@ var rpcClientErrorCases = map[string][]rpcClientErrorCase{
},
},
`{}`: {
{
name: "getaccountstate_unmarshalling_error",
invoke: func(c *Client) (interface{}, error) {
return c.GetAccountState("")
},
},
{
name: "getapplicationlog_unmarshalling_error",
invoke: func(c *Client) (interface{}, error) {