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

Fixes #635 #636

Merged
merged 1 commit into from
Mar 13, 2019
Merged
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
10 changes: 5 additions & 5 deletions neo/Network/RPC/RpcServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private JObject Process(string method, JArray _params)
}
case "getblockhash":
{
uint height = (uint)_params[0].AsNumber();
uint height = uint.Parse(_params[0].AsString());
return GetBlockHash(height);
}
case "getblockheader":
Expand All @@ -151,7 +151,7 @@ private JObject Process(string method, JArray _params)
}
case "getblocksysfee":
{
uint height = (uint)_params[0].AsNumber();
uint height = uint.Parse(_params[0].AsString());
return GetBlockSysFee(height);
}
case "getconnectioncount":
Expand Down Expand Up @@ -192,7 +192,7 @@ private JObject Process(string method, JArray _params)
case "gettxout":
{
UInt256 hash = UInt256.Parse(_params[0].AsString());
ushort index = (ushort)_params[1].AsNumber();
ushort index = ushort.Parse(_params[1].AsString());
return GetTxOut(hash, index);
}
case "getvalidators":
Expand Down Expand Up @@ -416,7 +416,7 @@ private JObject GetBlock(JObject key, bool verbose)
Block block;
if (key is JNumber)
{
uint index = (uint)key.AsNumber();
uint index = uint.Parse(key.AsString());
block = Blockchain.Singleton.Store.GetBlock(index);
}
else
Expand Down Expand Up @@ -457,7 +457,7 @@ private JObject GetBlockHeader(JObject key, bool verbose)
Header header;
if (key is JNumber)
{
uint height = (uint)key.AsNumber();
uint height = uint.Parse(key.AsString());
header = Blockchain.Singleton.Store.GetHeader(height);
}
else
Expand Down