Commit df4edec5 authored by Maurelian's avatar Maurelian Committed by GitHub

Add reentry protection to ExecutionManager.run() (#175)

* Add nonreentrant to ExecutionManager.run()

* Cheaper check using uninit'd tx context

* Remove extraneous import
parent 1c55b808
...@@ -144,6 +144,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -144,6 +144,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
override override
public public
{ {
require(transactionContext.ovmNUMBER == 0, "Only be callable at the start of a transaction");
// Store our OVM_StateManager instance (significantly easier than attempting to pass the // Store our OVM_StateManager instance (significantly easier than attempting to pass the
// address around in calldata). // address around in calldata).
ovmStateManager = iOVM_StateManager(_ovmStateManager); ovmStateManager = iOVM_StateManager(_ovmStateManager);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment