Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #925 from ethereum/eip-211
Browse files Browse the repository at this point in the history
Fix 2 eip-211 implementation issues
  • Loading branch information
Nashatyrev authored Aug 29, 2017
2 parents a8b94f7 + eb91dc0 commit 037958d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ public Repository getStorage() {

@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
public void createContract(DataWord value, DataWord memStart, DataWord memSize) {
returnDataBuffer = null; // reset return buffer right before the call

if (getCallDeep() == MAX_DEPTH) {
stackPushZero();
Expand Down Expand Up @@ -459,7 +460,6 @@ this, new DataWord(newAddress), getOwnerAddress(), value, gasLimit,
newBalance, null, track, this.invoke.getBlockStore(), false, byTestingSuite());

ProgramResult result = ProgramResult.empty();
returnDataBuffer = null; // reset return buffer right before the call

if (isNotEmpty(programCode)) {
VM vm = new VM(config);
Expand Down Expand Up @@ -535,6 +535,7 @@ this, new DataWord(newAddress), getOwnerAddress(), value, gasLimit,
* @param msg is the message call object
*/
public void callToAddress(MessageCall msg) {
returnDataBuffer = null; // reset return buffer right before the call

if (getCallDeep() == MAX_DEPTH) {
stackPushZero();
Expand Down Expand Up @@ -585,8 +586,6 @@ public void callToAddress(MessageCall msg) {

ProgramResult result = null;
if (isNotEmpty(programCode)) {
returnDataBuffer = null; // reset return buffer right before the call

ProgramInvoke programInvoke = programInvokeFactory.createProgramInvoke(
this, new DataWord(contextAddress),
msg.getType().callIsDelegate() ? getCallerAddress() : getOwnerAddress(),
Expand Down Expand Up @@ -1122,6 +1121,7 @@ public int verifyJumpDest(DataWord nextPC) {
}

public void callToPrecompiledAddress(MessageCall msg, PrecompiledContract contract) {
returnDataBuffer = null; // reset return buffer right before the call

if (getCallDeep() == MAX_DEPTH) {
stackPushZero();
Expand Down Expand Up @@ -1175,6 +1175,7 @@ public void callToPrecompiledAddress(MessageCall msg, PrecompiledContract contra

this.memorySave(msg.getOutDataOffs().intValue(), out);
this.stackPushOne();
returnDataBuffer = out;
track.commit();
}
}
Expand Down

0 comments on commit 037958d

Please sign in to comment.