Fix CALLCODE to use correct context address

This commit is contained in:
nicksavers 2014-10-20 11:47:17 +02:00
parent b14472b931
commit 7065c33487
1 changed files with 3 additions and 4 deletions

View File

@ -326,8 +326,7 @@ public class Program {
long refundGas = gas - result.getGasUsed();
if (refundGas > 0) {
this.refundGas(refundGas, "remain gas from the internal call");
if (logger.isInfoEnabled()){
if (logger.isInfoEnabled()) {
logger.info("The remaining gas is refunded, account: [{}], gas: [{}] ",
Hex.toHexString(this.getOwnerAddress().getLast20Bytes()),
refundGas);
@ -380,7 +379,7 @@ public class Program {
if (invokeData.byTestingSuite()) {
// This keeps track of the calls created for a test
this.getResult().addCallCreate(data.array(),
msg.getCodeAddress().getLast20Bytes(),
contextAddress,
msg.getGas().getNoLeadZeroesData(),
msg.getEndowment().getNoLeadZeroesData());
}
@ -392,7 +391,7 @@ public class Program {
trackRepository.startTracking();
ProgramInvoke programInvoke = ProgramInvokeFactory.createProgramInvoke(
this, msg.getCodeAddress(), msg.getEndowment(), msg.getGas(),
this, new DataWord(contextAddress), msg.getEndowment(), msg.getGas(),
contextBalance, data.array(), trackRepository,
this.invokeData.getCallDeep() + 1);