From 73c742a46628ac68fcfbf8010a3472d46af14ea9 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 9 Apr 2024 13:47:35 +0300 Subject: [PATCH] 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 --- pkg/core/native/management.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/core/native/management.go b/pkg/core/native/management.go index f362c9220..dc5d593e5 100644 --- a/pkg/core/native/management.go +++ b/pkg/core/native/management.go @@ -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