Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consensus and fork unit tests #934

Merged
merged 3 commits into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ modAionImpl/test_resources/masteryStateAt720106.txt filter=lfs diff=lfs merge=lf
modAionImpl/test_resources/masteryStateAt449071.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStorageAt449071.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStateAt1023848.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/mainnetStateAt1088453.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/mainnetStateAt3293751.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/mainnetStateAt3293723.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/mainnetStateAt3277219.txt filter=lfs diff=lfs merge=lfs -text
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class AbstractContractDetails implements ContractDetails {
protected int detailsInMemoryStorageLimit;

private Map<ByteArrayWrapper, byte[]> codes = new HashMap<>();
private byte[] performCode;
protected byte[] performCode;
// classes extending this rely on this value starting off as null
protected byte[] objectGraph = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ public void setObjectGraph(byte[] graph) {
setDirty(true);
}

@Override
public byte[] getTransformedCode() {
if (performCode == null && this.origContract != null) {
performCode = origContract.getTransformedCode();
}
return performCode;
}

/**
* Returns the storage hash.
*
Expand Down
Loading