Skip to content

Commit c41cfed

Browse files
committed
substract buffer from gas left directly
1 parent 47872a5 commit c41cfed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/protocol/taiko_alethia/MessageRelayer.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ contract MessageRelayer is ReentrancyGuardTransient, IMessageRelayer {
8989
} else {
9090
// EIP-150: Only 63/64 of gas can be forwarded to external calls.
9191
// Check against actual forwardable gas with buffer for operations before the call.
92-
uint256 maxForwardableGas = (gasleft() * 63 / 64) - BUFFER;
92+
uint256 maxForwardableGas = (gasleft() - BUFFER) * 63 / 64;
9393
require(gasLimit <= maxForwardableGas, InsufficientGas());
9494
(forwardMessageSuccess,) = to.call{value: valueToSend, gas: gasLimit}(data);
9595
}

0 commit comments

Comments
 (0)