Skip to content

Commit

Permalink
Update RpcServer.Blockchain.cs (#3458)
Browse files Browse the repository at this point in the history
Co-authored-by: Jimmy <[email protected]>
  • Loading branch information
chenzhitong and Jim8y authored Aug 13, 2024
1 parent a93adb7 commit 0d46c20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugins/RpcServer/RpcServer.Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ protected internal virtual JToken FindStorage(JArray _params)
byte[] prefix = Result.Ok_Or(() => Convert.FromBase64String(_params[1].AsString()), RpcError.InvalidParams.WithData($"Invalid Base64 string{_params[1]}"));
byte[] prefix_key = StorageKey.CreateSearchPrefix(id, prefix);

if (!int.TryParse(_params[2].AsString(), out int start))
int start = 0;
if (_params.Count > 2 && !int.TryParse(_params[2].AsString(), out start))
{
start = 0;
}
Expand Down

0 comments on commit 0d46c20

Please sign in to comment.