parent
415f87c727
commit
59ff195854
|
@ -238,7 +238,7 @@ public class Repository {
|
|||
state.setCodeHash(codeHash);
|
||||
|
||||
if (logger.isInfoEnabled())
|
||||
logger.info("Program code saved: account: [ {} ] codeHash: [ {} ] \n code: [ {} ]",
|
||||
logger.info("Program code saved:\n account: [ {} ]\n codeHash: [ {} ] \n code: [ {} ]",
|
||||
Hex.toHexString(address),
|
||||
Hex.toHexString(codeHash),
|
||||
Hex.toHexString(code));
|
||||
|
|
|
@ -244,6 +244,7 @@ public class Program {
|
|||
// 2.2 CREATE THE CONTRACT ADDRESS
|
||||
byte[] nonce = trackRepository.getNonce(senderAddress).toByteArray();
|
||||
byte[] newAddress = HashUtil.calcNewAddr(this.getOwnerAddress().getNoLeadZeroesData(), nonce);
|
||||
trackRepository.createAccount(newAddress);
|
||||
|
||||
// 2.3 UPDATE THE NONCE
|
||||
// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)
|
||||
|
@ -251,7 +252,7 @@ public class Program {
|
|||
|
||||
// 3. COOK THE INVOKE AND EXECUTE
|
||||
ProgramInvoke programInvoke =
|
||||
ProgramInvokeFactory.createProgramInvoke(this, DataWord.ZERO, DataWord.ZERO,
|
||||
ProgramInvokeFactory.createProgramInvoke(this, new DataWord(newAddress), DataWord.ZERO,
|
||||
gas, BigInteger.ZERO, null, trackRepository);
|
||||
|
||||
VM vm = new VM();
|
||||
|
|
|
@ -355,11 +355,9 @@ public class VMComplexTest {
|
|||
program.setRuntimeFailure(e);
|
||||
}
|
||||
|
||||
|
||||
System.out.println();
|
||||
System.out.println("============ Results ============");
|
||||
|
||||
|
||||
System.out.println("*** Used gas: " + program.result.getGasUsed());
|
||||
// todo: check that the value pushed after exec is the new address
|
||||
repository.close();
|
||||
|
|
Loading…
Reference in New Issue