Skip to content

Commit

Permalink
Remove special handling of precompled contracts in eip-1052 as they a…
Browse files Browse the repository at this point in the history
…re existant in repo
  • Loading branch information
zilm13 committed Aug 21, 2018
1 parent 33d217d commit 6f26891
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ethereumj-core/src/main/java/org/ethereum/vm/VM.java
Expand Up @@ -882,17 +882,7 @@ else if (oldValue != null && newValue.isZero()) {
break;
case EXTCODEHASH: {
DataWord address = program.stackPop();
PrecompiledContracts.PrecompiledContract contract =
PrecompiledContracts.getContractForAddress(address, blockchainConfig);

byte[] codeHash;
// The EXTCODEHASH of an precompiled contract is either c5d246... or 0
if (contract != null) {
codeHash = EMPTY_DATA_HASH;
} else {
codeHash = program.getCodeHashAt(address);
}

byte[] codeHash = program.getCodeHashAt(address);
program.stackPush(codeHash);
program.step();
}
Expand Down

0 comments on commit 6f26891

Please sign in to comment.