Skip to content

Commit

Permalink
Deal with contract destory (#196)
Browse files Browse the repository at this point in the history
* deal with contract destory

* remove delete key
  • Loading branch information
bettybao1209 authored Mar 26, 2020
1 parent bbcfa56 commit 74f3ebd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RpcNep5Tracker/RpcNep5Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ public JObject GetNep5Balances(JArray _params)
foreach (var (key, value) in dbCache.Find(prefix))
{
JObject balance = new JObject();
if (Blockchain.Singleton.View.Contracts.TryGet(key.AssetScriptHash) is null)
continue;
balance["asset_hash"] = key.AssetScriptHash.ToString();
balance["amount"] = value.Balance.ToString();
balance["last_updated_block"] = value.LastUpdatedBlock;
Expand Down

0 comments on commit 74f3ebd

Please sign in to comment.