Skip to content

Commit

Permalink
native: emit Deploy/Update notifications on native deploy/update
Browse files Browse the repository at this point in the history
Ported as a part of neo-project/neo#2942.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
  • Loading branch information
AnnaShaleva committed Apr 9, 2024
1 parent b87ac96 commit f087bde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/core/native/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ func (m *Management) OnPersist(ic *interop.Context) error {
cache = ic.DAO.GetRWCache(m.ID).(*ManagementCache)
}
updateContractCache(cache, cs)

ntfName := contractDeployNotificationName
if isUpdate {
ntfName = contractUpdateNotificationName
}
m.emitNotification(ic, ntfName, cs.Hash)
}

return nil
Expand Down

0 comments on commit f087bde

Please sign in to comment.