Skip to content

Commit

Permalink
Fix UpdateContract() (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Sep 9, 2020
1 parent 4066a4f commit 6561a78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neo/SmartContract/ApplicationEngine.Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ protected internal ContractState CreateContract(byte[] script, byte[] manifest)

protected internal void UpdateContract(byte[] script, byte[] manifest)
{
if (script is null && manifest is null) throw new ArgumentException();

AddGas(StoragePrice * (script?.Length ?? 0 + manifest?.Length ?? 0));

var contract = Snapshot.Contracts.TryGet(CurrentScriptHash);
Expand Down

0 comments on commit 6561a78

Please sign in to comment.