Skip to content

Commit

Permalink
sync neo (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
bettybao1209 authored Jan 31, 2021
1 parent dc1ea40 commit 3f99dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI01171" />
<PackageReference Include="Neo" Version="3.0.0-CI01181" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/RpcServer/RpcServer.Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ partial class RpcServer
[RpcMethod]
protected virtual JObject GetBestBlockHash(JArray _params)
{
return Blockchain.Singleton.CurrentBlockHash.ToString();
return NativeContract.Ledger.CurrentHash(Blockchain.Singleton.View).ToString();
}

[RpcMethod]
Expand Down Expand Up @@ -55,7 +55,7 @@ protected virtual JObject GetBlock(JArray _params)
[RpcMethod]
protected virtual JObject GetBlockCount(JArray _params)
{
return Blockchain.Singleton.Height + 1;
return NativeContract.Ledger.CurrentIndex(Blockchain.Singleton.View) + 1;
}

[RpcMethod]
Expand Down Expand Up @@ -131,7 +131,7 @@ protected virtual JObject GetRawMemPool(JArray _params)
return new JArray(Blockchain.Singleton.MemPool.GetVerifiedTransactions().Select(p => (JObject)p.Hash.ToString()));

JObject json = new JObject();
json["height"] = Blockchain.Singleton.Height;
json["height"] = NativeContract.Ledger.CurrentIndex(Blockchain.Singleton.View);
Blockchain.Singleton.MemPool.GetVerifiedAndUnverifiedTransactions(
out IEnumerable<Transaction> verifiedTransactions,
out IEnumerable<Transaction> unverifiedTransactions);
Expand Down

0 comments on commit 3f99dad

Please sign in to comment.