native: emit Deploy/Update notifications on native deploy/update

Ported as a part of https://github.com/neo-project/neo/pull/2942.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-04-09 13:47:35 +03:00
parent d62fad1268
commit 73c742a466

View file

@ -659,6 +659,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