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

Commit c788737

Browse files
ben-chainmaurelian
authored andcommitted
Reset Context on invalid gaslimit (#260)
* add reset * add to constructor
1 parent aa350b8 commit c788737

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
@@ -87,6 +87,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
8787
ovmSafetyCache = iOVM_SafetyCache(resolve("OVM_SafetyCache"));
8888
gasMeterConfig = _gasMeterConfig;
8989
globalContext = _globalContext;
90+
_resetContext();
9091
}
9192

9293

@@ -185,6 +186,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
185186
// Make sure the transaction's gas limit is valid. We don't revert here because we reserve
186187
// reverts for INVALID_STATE_ACCESS.
187188
if (_isValidGasLimit(_transaction.gasLimit, _transaction.l1QueueOrigin) == false) {
189+
_resetContext();
188190
return;
189191
}
190192

0 commit comments

Comments
 (0)