From 1841d818ece3f2cd753864fdfe7ecea7a608c1a9 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 18 Oct 2023 20:12:05 +0300 Subject: [PATCH] rpcclient: always provide `start` parameter for `findstorage` RPC Close #3137. Signed-off-by: Anna Shaleva --- pkg/rpcclient/rpc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/rpcclient/rpc.go b/pkg/rpcclient/rpc.go index fe6abc154..175200b76 100644 --- a/pkg/rpcclient/rpc.go +++ b/pkg/rpcclient/rpc.go @@ -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) }