native: drop OnPersistEnd

Now that PostPersist is being run for every native contract we can do our
dirty caching tricks right there instead of OnPersistEnd.
This commit is contained in:
Roman Khimov 2020-12-13 23:30:21 +03:00
parent 938be298f0
commit cb5ecaefe7
9 changed files with 21 additions and 64 deletions

View file

@ -225,7 +225,6 @@ func TestNEO_SetGasPerBlock(t *testing.T) {
ok, err := neo.SetGASPerBlock(ic, 10, big.NewInt(native.GASFactor*2))
require.NoError(t, err)
require.True(t, ok)
neo.OnPersistEnd(ic.DAO)
_, err = ic.DAO.Persist()
require.NoError(t, err)
@ -242,7 +241,6 @@ func TestNEO_SetGasPerBlock(t *testing.T) {
})
})
neo.OnPersistEnd(ic.DAO)
g := neo.GetGASPerBlock(ic.DAO, 9)
require.EqualValues(t, 5*native.GASFactor, g.Int64())