Commit a9bffb37 by Nicolás Venturo Committed by Leo Arias

Now setting the finalized flag before doing finalization to prevent possbile…

Now setting the finalized flag before doing finalization to prevent possbile reentrancy issues. (#1447)


(cherry picked from commit 5bb86521)
parent 6e53c4e1
...@@ -34,10 +34,10 @@ contract FinalizableCrowdsale is TimedCrowdsale { ...@@ -34,10 +34,10 @@ contract FinalizableCrowdsale is TimedCrowdsale {
require(!_finalized); require(!_finalized);
require(hasClosed()); require(hasClosed());
_finalized = true;
_finalization(); _finalization();
emit CrowdsaleFinalized(); emit CrowdsaleFinalized();
_finalized = true;
} }
/** /**
...@@ -47,5 +47,4 @@ contract FinalizableCrowdsale is TimedCrowdsale { ...@@ -47,5 +47,4 @@ contract FinalizableCrowdsale is TimedCrowdsale {
*/ */
function _finalization() internal { function _finalization() internal {
} }
} }
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