diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/VariablesStorage.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/VariablesStorage.java index 3b3af12d598..8fdc6ed3b4d 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/VariablesStorage.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/VariablesStorage.java @@ -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; diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/keyvalue/VariablesKeyValueStorage.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/keyvalue/VariablesKeyValueStorage.java index c00b0070bd2..f2a55782f9c 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/keyvalue/VariablesKeyValueStorage.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/keyvalue/VariablesKeyValueStorage.java @@ -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; @@ -70,7 +70,7 @@ public Optional getLocalEnrSeqno() { @Override public Optional isCodeStoredUsingCodeHash() { - return getVariable(CODE_MODE).map(b -> b.toInt() == 1); + return getVariable(CODE_USING_CODE_HASH).map(b -> b.toInt() == 1); } @Override @@ -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 @@ -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