Skip to content

Commit

Permalink
Merge result of inner CREATE only when all checks passed
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalinin committed Aug 12, 2018
1 parent a47945b commit 0507ec1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ this, new DataWord(newAddress), getOwnerAddress(), value, gasLimit,
Program program = new Program(programCode, programInvoke, internalTx, config).withCommonConfig(commonConfig);
vm.play(program);
result = program.getResult();

getResult().merge(result);
}

// 4. CREATE THE CONTRACT OUT OF RETURN
Expand All @@ -499,6 +497,8 @@ this, new DataWord(newAddress), getOwnerAddress(), value, gasLimit,
track.saveCode(newAddress, code);
}

getResult().merge(result);

if (result.getException() != null || result.isRevert()) {
logger.debug("contract run halted by Exception: contract: [{}], exception: [{}]",
toHexString(newAddress),
Expand Down

0 comments on commit 0507ec1

Please sign in to comment.