Skip to content

Commit 0aaa5ce

Browse files
committed
native: extend Management notifications test with Domovoi fork check
There should be no contract updates in Domovoi. Signed-off-by: Anna Shaleva <[email protected]>
1 parent 759667f commit 0aaa5ce

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pkg/core/native/native_test/management_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func TestManagement_NativeDeployUpdateNotifications(t *testing.T) {
210210
}
211211
})
212212
e := mgmt.Executor
213+
mgmt.GenerateNewBlocks(t, echidnaHeight)
213214

214215
// Check Deploy notifications.
215216
aer, err := mgmt.Chain.GetAppExecResults(e.GetBlockByIndex(t, 0).Hash(), trigger.OnPersist)
@@ -251,8 +252,7 @@ func TestManagement_NativeDeployUpdateNotifications(t *testing.T) {
251252
}
252253
require.Equal(t, expected, aer[0].Events)
253254

254-
// Generate some blocks and check Update notifications for Cockatrice hardfork.
255-
mgmt.GenerateNewBlocks(t, cockatriceHeight-int(mgmt.Chain.BlockHeight()))
255+
// Check Update notifications for Cockatrice hardfork.
256256
aer, err = mgmt.Chain.GetAppExecResults(mgmt.Chain.GetHeaderHash(cockatriceHeight), trigger.OnPersist)
257257
require.NoError(t, err)
258258
require.Equal(t, 1, len(aer))
@@ -268,8 +268,14 @@ func TestManagement_NativeDeployUpdateNotifications(t *testing.T) {
268268
}
269269
require.Equal(t, expected, aer[0].Events)
270270

271-
// Generate some blocks and check notifications for Echidna hardfork.
272-
mgmt.GenerateNewBlocks(t, echidnaHeight-int(mgmt.Chain.BlockHeight()))
271+
// Check that there's no native contract updates in Domovoi hardfork.
272+
aer, err = mgmt.Chain.GetAppExecResults(mgmt.Chain.GetHeaderHash(domovoiHeight), trigger.OnPersist)
273+
require.NoError(t, err)
274+
require.Equal(t, 1, len(aer))
275+
expected = expected[:0]
276+
require.Equal(t, expected, aer[0].Events)
277+
278+
// Check notifications for Echidna hardfork.
273279
aer, err = mgmt.Chain.GetAppExecResults(mgmt.Chain.GetHeaderHash(echidnaHeight), trigger.OnPersist)
274280
require.NoError(t, err)
275281
require.Equal(t, 1, len(aer))

0 commit comments

Comments
 (0)