Skip to content

Commit

Permalink
Merge branch 'master' into fixes/syscalls
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Apr 8, 2020
2 parents 8d2d524 + c0a4114 commit 063357e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/neo/Network/P2P/Payloads/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ public void DeserializeUnsigned(BinaryReader reader)
Sender = reader.ReadSerializable<UInt160>();
SystemFee = reader.ReadInt64();
if (SystemFee < 0) throw new FormatException();
if (SystemFee % NativeContract.GAS.Factor != 0) throw new FormatException();
NetworkFee = reader.ReadInt64();
if (NetworkFee < 0) throw new FormatException();
if (SystemFee + NetworkFee < SystemFee) throw new FormatException();
Expand Down
9 changes: 0 additions & 9 deletions src/neo/Wallets/Wallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,6 @@ private Transaction MakeTransaction(StoreView snapshot, byte[] script, Transacti
if (engine.State.HasFlag(VMState.FAULT))
throw new InvalidOperationException($"Failed execution for '{script.ToHexString()}'");
tx.SystemFee = Math.Max(engine.GasConsumed - ApplicationEngine.GasFree, 0);
if (tx.SystemFee > 0)
{
long d = (long)NativeContract.GAS.Factor;
long remainder = tx.SystemFee % d;
if (remainder > 0)
tx.SystemFee += d - remainder;
else if (remainder < 0)
tx.SystemFee -= remainder;
}
}

UInt160[] hashes = tx.GetScriptHashesForVerifying(snapshot);
Expand Down

0 comments on commit 063357e

Please sign in to comment.