Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
1826d149
Commit
1826d149
authored
Sep 20, 2020
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wipe context after em.run
parent
9b63875c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
OVM_ExecutionManager.sol
...ptimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
+25
-0
.iOVM_ExecutionManager.sol.swp
...ic-ethereum/iOVM/execution/.iOVM_ExecutionManager.sol.swp
+0
-0
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
View file @
1826d149
...
...
@@ -132,6 +132,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
// Update the cumulative gas based on the amount of gas used.
_updateCumulativeGas(gasUsed, _transaction.queueOrigin);
// Wipe the execution context.
_resetContext();
}
...
...
@@ -1524,6 +1527,28 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
}
}
/**
* Resets the transaction and message context.
*/
function _resetContext()
internal
{
transactionContext.ovmORIGIN = address(0);
transactionContext.ovmTIMESTAMP = 0;
transactionContext.ovmGASLIMIT = 0;
transactionContext.ovmTXGASLIMIT = 0;
transactionContext.ovmQUEUEORIGIN = 0;
transactionRecord.ovmGasRefund = 0;
messageContext.ovmCALLER = address(0);
messageContext.ovmADDRESS = address(0);
messageContext.isStatic = false;
messageRecord.nuisanceGasLeft = 0;
messageRecord.revertFlag = RevertFlag.DID_NOT_REVERT;
}
/**
* Checks whether we're inside contract creation code.
* @return _inCreation Whether or not we're in a contract creation.
...
...
packages/contracts/contracts/optimistic-ethereum/iOVM/execution/.iOVM_ExecutionManager.sol.swp
0 → 100644
View file @
1826d149
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment