Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Frame <[email protected]>
  • Loading branch information
jframe committed Dec 13, 2023
1 parent b5b4601 commit 0dbfc2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum Keys {
FINALIZED_BLOCK_HASH("finalizedBlockHash"),
SAFE_BLOCK_HASH("safeBlockHash"),
SEQ_NO_STORE("local-enr-seqno"),
CODE_MODE("codeHash");
CODE_USING_CODE_HASH("codeUsingCodeHash");

private final String key;
private final byte[] byteArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.storage.keyvalue;

import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.CHAIN_HEAD_HASH;
import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.CODE_MODE;
import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.CODE_USING_CODE_HASH;
import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.FINALIZED_BLOCK_HASH;
import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.FORK_HEADS;
import static org.hyperledger.besu.ethereum.chain.VariablesStorage.Keys.SAFE_BLOCK_HASH;
Expand Down Expand Up @@ -70,7 +70,7 @@ public Optional<Bytes> getLocalEnrSeqno() {

@Override
public Optional<Boolean> isCodeStoredUsingCodeHash() {
return getVariable(CODE_MODE).map(b -> b.toInt() == 1);
return getVariable(CODE_USING_CODE_HASH).map(b -> b.toInt() == 1);
}

@Override
Expand Down Expand Up @@ -124,7 +124,7 @@ public void setLocalEnrSeqno(final Bytes nodeRecord) {
@Override
public void setCodeStoredUsingCodeHash(final boolean isCodeHash) {
final Bytes codeModeAsBytes = isCodeHash ? Bytes.minimalBytes(1) : Bytes.minimalBytes(0);
setVariable(CODE_MODE, codeModeAsBytes);
setVariable(CODE_USING_CODE_HASH, codeModeAsBytes);
}

@Override
Expand All @@ -134,7 +134,7 @@ public void removeAll() {
removeVariable(SAFE_BLOCK_HASH);
removeVariable(FORK_HEADS);
removeVariable(SEQ_NO_STORE);
removeVariable(CODE_MODE);
removeVariable(CODE_USING_CODE_HASH);
}

@Override
Expand Down

0 comments on commit 0dbfc2b

Please sign in to comment.