Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RpcClient #757

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/RpcClient/RpcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public async Task<uint> GetBlockCountAsync()
/// <summary>
/// Returns the hash value of the corresponding block, based on the specified index.
/// </summary>
public async Task<string> GetBlockHashAsync(int index)
public async Task<string> GetBlockHashAsync(uint index)
{
var result = await RpcSendAsync(GetRpcName(), index).ConfigureAwait(false);
return result.AsString();
Expand Down
2 changes: 1 addition & 1 deletion tests/Neo.Network.RPC.Tests/UT_RpcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public async Task TestGetBlockCount()
public async Task TestGetBlockHash()
{
var test = TestUtils.RpcTestCases.Find(p => p.Name == nameof(rpc.GetBlockHashAsync).ToLower());
var result = await rpc.GetBlockHashAsync((int)test.Request.Params[0].AsNumber());
var result = await rpc.GetBlockHashAsync((uint)test.Request.Params[0].AsNumber());
Assert.AreEqual(test.Response.Result.AsString(), result.ToString());
}

Expand Down