Skip to content

Commit

Permalink
Renamed performCode into transformedCode to avoid terminology confusions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraRoatis committed Aug 16, 2019
1 parent 14d7fdc commit 9968a64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -24,7 +24,7 @@ public abstract class AbstractContractDetails implements ContractDetails {
protected int detailsInMemoryStorageLimit;

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

Expand Down Expand Up @@ -56,14 +56,14 @@ public byte[] getCode(byte[] codeHash) {

@Override
public byte[] getTransformedCode() {
return performCode;
return transformedCode;
}

@Override
public void setTransformedCode(byte[] transformedCode) {
// ensures that the object is not set to dirty when copied
if (!Arrays.equals(performCode, transformedCode)) {
performCode = transformedCode;
if (!Arrays.equals(this.transformedCode, transformedCode)) {
this.transformedCode = transformedCode;
setDirty(true);
}
}
Expand Down
Expand Up @@ -144,10 +144,10 @@ public void setObjectGraph(byte[] graph) {

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

/**
Expand Down

0 comments on commit 9968a64

Please sign in to comment.