Skip to content

Commit 146f3de

Browse files
committed
native: emit Deploy/Update notifications on native deploy/update
Ported as a part of neo-project/neo#2942. Signed-off-by: Anna Shaleva <[email protected]>
1 parent 5143cf5 commit 146f3de

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/core/native/management.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,12 @@ func (m *Management) OnPersist(ic *interop.Context) error {
658658
cache = ic.DAO.GetRWCache(m.ID).(*ManagementCache)
659659
}
660660
updateContractCache(cache, cs)
661+
662+
ntfName := contractDeployNotificationName
663+
if isUpdate {
664+
ntfName = contractUpdateNotificationName
665+
}
666+
m.emitNotification(ic, ntfName, cs.Hash)
661667
}
662668

663669
return nil

0 commit comments

Comments
 (0)