Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.

Commit 2d9e413

Browse files
authored
Reset Context on invalid gaslimit (#260)
* add reset * add to constructor
1 parent e811147 commit 2d9e413

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
8585
ovmSafetyChecker = iOVM_SafetyChecker(resolve("OVM_SafetyChecker"));
8686
gasMeterConfig = _gasMeterConfig;
8787
globalContext = _globalContext;
88+
_resetContext();
8889
}
8990

9091

@@ -183,6 +184,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
183184
// Make sure the transaction's gas limit is valid. We don't revert here because we reserve
184185
// reverts for INVALID_STATE_ACCESS.
185186
if (_isValidGasLimit(_transaction.gasLimit, _transaction.l1QueueOrigin) == false) {
187+
_resetContext();
186188
return;
187189
}
188190

0 commit comments

Comments
 (0)