Merge pull request #3166 from nspcc-dev/find-storage-param

rpcclient: always provide `start` parameter for `findstorage` RPC
This commit is contained in:
Roman Khimov 2023-10-18 21:32:50 +03:00 committed by GitHub
commit cb0ef2de3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,6 +578,9 @@ func (c *Client) FindStorageByHash(contractHash util.Uint160, prefix []byte, sta
var params = []any{contractHash.StringLE(), prefix}
if start != nil {
params = append(params, *start)
} else {
// C# node expects `start` parameter in any case.
params = append(params, 0)
}
return c.findStorage(params)
}
@ -589,6 +592,9 @@ func (c *Client) FindStorageByID(contractID int32, prefix []byte, start *int) (r
var params = []any{contractID, prefix}
if start != nil {
params = append(params, *start)
} else {
// C# node expects `start` parameter in any case.
params = append(params, 0)
}
return c.findStorage(params)
}