You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Incorrect GAS calculation in System.Contract.Update syscall. Manifest is not taken into account if script it non-null.
To Reproduce
Call ApplicationEngine.UpdateContract with non-empty script and manifest. Set GAS limit to StoragePrice * len(script).
Expected behavior
Error because of insufficient GAS.
This line AddGas(StoragePrice * (script?.Length ?? 0 + manifest?.Length ?? 0)); should probably be written as AddGas(StoragePrice * ((script?.Length ?? 0) + (manifest?.Length ?? 0)));
The text was updated successfully, but these errors were encountered:
Describe the bug
Incorrect GAS calculation in
System.Contract.Update
syscall. Manifest is not taken into account if script it non-null.To Reproduce
Call
ApplicationEngine.UpdateContract
with non-empty script and manifest. Set GAS limit toStoragePrice * len(script)
.Expected behavior
Error because of insufficient GAS.
This line
AddGas(StoragePrice * (script?.Length ?? 0 + manifest?.Length ?? 0));
should probably be written asAddGas(StoragePrice * ((script?.Length ?? 0) + (manifest?.Length ?? 0)));
The text was updated successfully, but these errors were encountered: