diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/bonsai/storage/flat/FlatDbStrategy.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/bonsai/storage/flat/FlatDbStrategy.java index 9d7a0245d42..c561dcd8609 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/bonsai/storage/flat/FlatDbStrategy.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/bonsai/storage/flat/FlatDbStrategy.java @@ -23,7 +23,6 @@ import org.hyperledger.besu.datatypes.StorageSlotKey; import org.hyperledger.besu.ethereum.trie.NodeLoader; import org.hyperledger.besu.metrics.BesuMetricCategory; -import org.hyperledger.besu.plugin.data.BlockHeader; import org.hyperledger.besu.plugin.services.MetricsSystem; import org.hyperledger.besu.plugin.services.metrics.Counter; import org.hyperledger.besu.plugin.services.storage.SegmentedKeyValueStorage; @@ -233,13 +232,4 @@ public Map streamStorageFlatDatabase( pairStream.close(); return collected; } - - public void updateBlockContext(final BlockHeader blockHeader) { - // default no-op for strategies that do not care about bonsai context - } - - public FlatDbStrategy contextSafeClone() { - // FlatDBStrategies that care about bonsai context changes should override this - return this; - } } diff --git a/plugin-api/build.gradle b/plugin-api/build.gradle index 98dd4a046a8..a091f97c151 100644 --- a/plugin-api/build.gradle +++ b/plugin-api/build.gradle @@ -69,7 +69,7 @@ Calculated : ${currentHash} tasks.register('checkAPIChanges', FileStateChecker) { description = "Checks that the API for the Plugin-API project does not change without deliberate thought" files = sourceSets.main.allJava.files - knownHash = 'mELgOHUFNqiqbP822m8GYuS1egIdboOaE7mxAQosIgk=' + knownHash = 'BhqPyj1fT50NWuHTgzgCmW1ynAPj/2QiGWraq5OwgOQ=' } check.dependsOn('checkAPIChanges') diff --git a/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/storage/SegmentedKeyValueStorage.java b/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/storage/SegmentedKeyValueStorage.java index 5ce0274fc3d..df8a8c48941 100644 --- a/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/storage/SegmentedKeyValueStorage.java +++ b/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/storage/SegmentedKeyValueStorage.java @@ -169,7 +169,7 @@ record NearestKeyValue(Bytes key, Optional value) { /** * Convenience method to map the Optional value to Bytes. * - * @return Optional + * @return Optional of Bytes. */ public Optional wrapBytes() { return value.map(Bytes::wrap); diff --git a/services/kvstore/src/main/java/org/hyperledger/besu/services/kvstore/SegmentedInMemoryKeyValueStorage.java b/services/kvstore/src/main/java/org/hyperledger/besu/services/kvstore/SegmentedInMemoryKeyValueStorage.java index 029602e9573..053057b405e 100644 --- a/services/kvstore/src/main/java/org/hyperledger/besu/services/kvstore/SegmentedInMemoryKeyValueStorage.java +++ b/services/kvstore/src/main/java/org/hyperledger/besu/services/kvstore/SegmentedInMemoryKeyValueStorage.java @@ -116,8 +116,7 @@ public Optional get(final SegmentIdentifier segmentIdentifier, final byt public Optional getNearestTo( final SegmentIdentifier segmentIdentifier, final Bytes key) throws StorageException { - // TODO: this is a naive implementation which should be revisited for performance - + // TODO: revisit this for sort performance Comparator>> comparing = Comparator.comparing( (Map.Entry> a) -> a.getKey().commonPrefixLength(key))