rpc: drop support for getassetstate
It's for UTXO assets and it's absent in Neo 3.
This commit is contained in:
parent
63eb6069b2
commit
232e1a2598
7 changed files with 0 additions and 138 deletions
|
@ -20,7 +20,6 @@ Supported methods
|
|||
|
||||
getaccountstate
|
||||
getapplicationlog
|
||||
getassetstate
|
||||
getbestblockhash
|
||||
getblock
|
||||
getblockcount
|
||||
|
|
|
@ -40,18 +40,6 @@ func (c *Client) GetApplicationLog(hash util.Uint256) (*result.ApplicationLog, e
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetAssetState queries the asset information, based on the specified asset number.
|
||||
func (c *Client) GetAssetState(hash util.Uint256) (*result.AssetState, error) {
|
||||
var (
|
||||
params = request.NewRawParams(hash.StringLE())
|
||||
resp = &result.AssetState{}
|
||||
)
|
||||
if err := c.performRequest("getassetstate", params, resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetBestBlockHash returns the hash of the tallest block in the main chain.
|
||||
func (c *Client) GetBestBlockHash() (util.Uint256, error) {
|
||||
var resp = util.Uint256{}
|
||||
|
|
|
@ -204,30 +204,6 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
|
|||
},
|
||||
},
|
||||
},
|
||||
"getassetstate": {
|
||||
{
|
||||
name: "positive",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
return c.GetAssetState(util.Uint256{})
|
||||
},
|
||||
serverResponse: `{"id":1,"jsonrpc":"2.0","result":{"id":"0x1a5e0e3eac2abced7de9ee2de0820a5c85e63756fcdfc29b82fead86a7c07c78","type":0,"name":"NEO","amount":"100000000","available":"100000000","precision":0,"owner":"00","admin":"Abf2qMs1pzQb8kYk9RuxtUb9jtRKJVuBJt","issuer":"AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM","expiration":4000000,"is_frozen":false}}`,
|
||||
result: func(c *Client) interface{} {
|
||||
return &result.AssetState{
|
||||
ID: core.GoverningTokenID(),
|
||||
AssetType: 0,
|
||||
Name: "NEO",
|
||||
Amount: util.Fixed8FromInt64(100000000),
|
||||
Available: util.Fixed8FromInt64(100000000),
|
||||
Precision: 0,
|
||||
Owner: "00",
|
||||
Admin: "Abf2qMs1pzQb8kYk9RuxtUb9jtRKJVuBJt",
|
||||
Issuer: "AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM",
|
||||
Expiration: 4000000,
|
||||
IsFrozen: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"getbestblockhash": {
|
||||
{
|
||||
name: "positive",
|
||||
|
@ -981,12 +957,6 @@ var rpcClientErrorCases = map[string][]rpcClientErrorCase{
|
|||
return c.GetApplicationLog(util.Uint256{})
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getassetstate_invalid_params_error",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
return c.GetAssetState(core.GoverningTokenID())
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getbestblockhash_invalid_params_error",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
|
@ -1145,12 +1115,6 @@ var rpcClientErrorCases = map[string][]rpcClientErrorCase{
|
|||
return c.GetApplicationLog(util.Uint256{})
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getassetstate_unmarshalling_error",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
return c.GetAssetState(core.GoverningTokenID())
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getbestblockhash_unmarshalling_error",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue