diff --git a/ethereumj-core/src/main/java/org/ethereum/vm/program/Program.java b/ethereumj-core/src/main/java/org/ethereum/vm/program/Program.java index e58e73622d..44e98658c0 100644 --- a/ethereumj-core/src/main/java/org/ethereum/vm/program/Program.java +++ b/ethereumj-core/src/main/java/org/ethereum/vm/program/Program.java @@ -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 @@ -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),