rpc: use base64 for getstorage in/out

See neo-project/neo#484.
This commit is contained in:
Roman Khimov 2021-02-07 18:27:19 +03:00
parent 66471de9d2
commit 272bb03e3b
4 changed files with 15 additions and 21 deletions

View file

@ -595,7 +595,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
}
return c.GetStorageByHash(hash, key)
},
serverResponse: `{"jsonrpc":"2.0","id":1,"result":"4c696e"}`,
serverResponse: `{"jsonrpc":"2.0","id":1,"result":"TGlu"}`,
result: func(c *Client) interface{} {
value, err := hex.DecodeString("4c696e")
if err != nil {
@ -613,7 +613,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
}
return c.GetStorageByID(-1, key)
},
serverResponse: `{"jsonrpc":"2.0","id":1,"result":"4c696e"}`,
serverResponse: `{"jsonrpc":"2.0","id":1,"result":"TGlu"}`,
result: func(c *Client) interface{} {
value, err := hex.DecodeString("4c696e")
if err != nil {