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

Update NotificationMgr.cs #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Fura/NotificationMgr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void ExecuteGasSepical(NotificationModel notificationModel, NeoSystem sy
DBCache.Ins.cacheAddress.AddNeedUpdate(from, block.Timestamp);
DBCache.Ins.cacheAddress.AddNeedUpdate(to, block.Timestamp);

if (from == UInt160.Zero || from is null) //如果from为0x0,意味着发行代币,这个时候需要更新资产的总量
if (from == UInt160.Zero || from is null || to == UInt160.Zero || to is null) //如果from为0x0,意味着发行代币,如果to为0x0,意味着销毁代币,这个时候需要更新资产的总量
{
DBCache.Ins.cacheAsset.AddNeedUpdate(notificationModel.ContractHash, block.Timestamp, EnumAssetType.NEP17);
}
Expand Down Expand Up @@ -214,7 +214,7 @@ private void ExecuteNep11TransferNotification(NotificationModel notificationMode

DBCache.Ins.cacheAddress.Add(block.Timestamp, from, to);
DBCache.Ins.cacheNep11Properties.AddNeedUpdate(notificationModel.ContractHash, tokenId);
if (from == UInt160.Zero || from is null) //如果from为0x0,意味着发行代币,这个时候需要更新资产的总量
if (from == UInt160.Zero || from is null || to == UInt160.Zero || to is null) //如果from为0x0,意味着发行代币,如果to为0x0,意味着销毁代币,这个时候需要更新资产的总量
{
DBCache.Ins.cacheAsset.AddNeedUpdate(notificationModel.ContractHash, block.Timestamp, EnumAssetType.NEP11);
}
Expand Down