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

Feature/eip 1052 #1162

Merged
merged 4 commits into from
Aug 23, 2018
Merged

Feature/eip 1052 #1162

merged 4 commits into from
Aug 23, 2018

Conversation

zilm13
Copy link
Collaborator

@zilm13 zilm13 commented Aug 20, 2018

Do not merge, GitHubBlockStateTest tests are not passed.

@zilm13 zilm13 requested a review from mkalinin August 20, 2018 19:39
@coveralls
Copy link

coveralls commented Aug 20, 2018

Coverage Status

Coverage decreased (-0.02%) to 56.107% when pulling 6f26891 on feature/eip-1052 into ec3ce8f on develop.

@@ -147,7 +147,7 @@ public synchronized void saveCode(byte[] addr, byte[] code) {
@Override
public byte[] getCodeHash(byte[] addr) {
AccountState accountState = getAccountState(addr);
return accountState != null ? accountState.getCodeHash() : HashUtil.EMPTY_DATA_HASH;
return accountState != null ? accountState.getCodeHash() : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that this change won't break anything else than getCode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkalinin checked it with extra attention, it shouldn't break anything for us

PrecompiledContracts.getContractForAddress(address, blockchainConfig);

byte[] codeHash;
// The EXTCODEHASH of an precompiled contract is either c5d246... or 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it means that if precompile acc is non-existent the hash is 0 otherwise the hash is an empty data hash.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence, precompile contract doesn't need a special case to be processed

@zilm13 zilm13 mentioned this pull request Aug 21, 2018
5 tasks
@mkalinin mkalinin merged commit 82d96c1 into develop Aug 23, 2018
@zilm13 zilm13 deleted the feature/eip-1052 branch September 20, 2018 09:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants