Skip to content

Commit

Permalink
remove round up sysfee (neo-project#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
bettybao1209 authored and Tommo-L committed Jun 22, 2020
1 parent 8b043e8 commit 9fe188a
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 9fe188a

Please sign in to comment.