core: fix storage.Delete price
This commit is contained in:
parent
0bca63b907
commit
5b18f5974f
2 changed files with 1 additions and 2 deletions
|
@ -69,7 +69,6 @@ func storageDelete(ic *interop.Context) error {
|
|||
if stc.ReadOnly {
|
||||
return errors.New("StorageContext is read only")
|
||||
}
|
||||
ic.VM.AddGas(ic.Chain.GetPolicer().GetStoragePrice())
|
||||
key := ic.VM.Estack().Pop().Bytes()
|
||||
return ic.DAO.DeleteStorageItem(stc.ID, key)
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ var systemInterops = []interop.Function{
|
|||
{Name: interopnames.SystemRuntimeNotify, Func: runtime.Notify, Price: 1 << 15, RequiredFlags: callflag.AllowNotify,
|
||||
ParamCount: 2},
|
||||
{Name: interopnames.SystemRuntimePlatform, Func: runtime.Platform, Price: 1 << 3},
|
||||
{Name: interopnames.SystemStorageDelete, Func: storageDelete, Price: 0,
|
||||
{Name: interopnames.SystemStorageDelete, Func: storageDelete, Price: 1 << 15,
|
||||
RequiredFlags: callflag.WriteStates, ParamCount: 2},
|
||||
{Name: interopnames.SystemStorageFind, Func: storageFind, Price: 1 << 15, RequiredFlags: callflag.ReadStates,
|
||||
ParamCount: 3},
|
||||
|
|
Loading…
Reference in a new issue