Skip to content

Commit

Permalink
fix gas limit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KePeng1019 committed Jul 26, 2019
1 parent e6fb817 commit 861166e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/iost/model/transaction/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class Transaction {
private String hash = "";

public transient long gas_limit = 0;
public float gas_limit = 0;
public long gas_ratio, time = 0, expiration = 0, delay = 0;
public List<Signature> signatures = new ArrayList<>();
public List<Action> actions = new ArrayList<>();
Expand All @@ -30,7 +30,8 @@ public byte[] signBytes() {
se.buffer.putLong(this.time);
se.buffer.putLong(this.expiration);
se.buffer.putLong(this.gas_ratio * 100);
se.buffer.putLong(this.gas_limit * 100);
long floorGasLimit = (long) this.gas_limit;
se.buffer.putLong(floorGasLimit * 100);
se.buffer.putLong(this.delay);
se.buffer.putInt(this.chain_id);

Expand Down

0 comments on commit 861166e

Please sign in to comment.