Skip to content

Commit 5d7333f

Browse files
DavePearceamkCha
authored andcommitted
fix: gas calculation for TX skip
1 parent d01d8ac commit 5d7333f

File tree

1 file changed

+2
-1
lines changed
  • arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/section/skip

1 file changed

+2
-1
lines changed

arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/section/skip/TxSkipSection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ public void resolveAtEndTransaction(
126126
final Wei value = (Wei) txMetadata.getBesuTransaction().getValue();
127127

128128
if (txMetadata.senderAddressCollision()) {
129-
final BigInteger gasUsed = BigInteger.valueOf(txMetadata.getGasUsed());
129+
final BigInteger gasUsed =
130+
BigInteger.valueOf(txMetadata.getGasLimit() - txMetadata.getGasRefunded());
130131
final BigInteger gasPrice = BigInteger.valueOf(txMetadata.getEffectiveGasPrice());
131132
final BigInteger gasCost = gasUsed.multiply(gasPrice);
132133
senderNew =

0 commit comments

Comments
 (0)