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
10667c03
Commit
10667c03
authored
Sep 20, 2020
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed em.run
parent
abc2095d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
OVM_ExecutionManager.sol
...ptimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
+21
-8
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
View file @
10667c03
...
@@ -103,10 +103,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -103,10 +103,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
override
override
public
public
{
{
// Initialize the transaction context.
// Store our OVM_StateManager instance (significantly easier than attempting to pass the address
transactionContext.ovmTIMESTAMP = _transaction.timestamp;
// around in calldata).
transactionContext.ovmTXGASLIMIT = _transaction.gasLimit;
ovmStateManager = iOVM_StateManager(_ovmStateManager);
transactionContext.ovmQUEUEORIGIN = _transaction.queueOrigin;
// Check whether we need to start a new epoch, do so if necessary.
// Check whether we need to start a new epoch, do so if necessary.
_checkNeedsNewEpoch(_transaction.timestamp);
_checkNeedsNewEpoch(_transaction.timestamp);
...
@@ -117,10 +116,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -117,10 +116,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
return;
return;
}
}
// Store our OVM_StateManager instance (significantly easier than attempting to pass the address
// Initialize the execution context.
// around in calldata).
_initContext(_transaction);
ovmStateManager = iOVM_StateManager(_ovmStateManager);
// Run the transaction, make sure to meter the gas usage.
// Run the transaction, make sure to meter the gas usage.
uint256 gasLimit = gasleft();
uint256 gasLimit = gasleft();
ovmCALL(
ovmCALL(
...
@@ -1527,6 +1525,21 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1527,6 +1525,21 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
}
}
}
}
/**
* Initializes the execution context.
* @param _transaction OVM transaction being executed.
*/
function _initContext(
Lib_OVMCodec.Transaction memory _transaction
)
internal
{
transactionContext.ovmTIMESTAMP = _transaction.timestamp;
transactionContext.ovmTXGASLIMIT = _transaction.gasLimit;
transactionContext.ovmQUEUEORIGIN = _transaction.queueOrigin;
transactionContext.ovmGASLIMIT = gasMeterConfig.maxGasPerQueuePerEpoch;
}
/**
/**
* Resets the transaction and message context.
* Resets the transaction and message context.
*/
*/
...
...
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