Skip to content

Commit

Permalink
javadoc, remove archive interface references, update TODO
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <garyschulte@gmail.com>
  • Loading branch information
garyschulte committed Sep 19, 2023
1 parent 448d4cf commit 8e78bcb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -233,13 +232,4 @@ public Map<Bytes32, Bytes> 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;
}
}
2 changes: 1 addition & 1 deletion plugin-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ record NearestKeyValue(Bytes key, Optional<byte[]> value) {
/**
* Convenience method to map the Optional value to Bytes.
*
* @return Optional<Bytes>
* @return Optional of Bytes.
*/
public Optional<Bytes> wrapBytes() {
return value.map(Bytes::wrap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ public Optional<byte[]> get(final SegmentIdentifier segmentIdentifier, final byt
public Optional<NearestKeyValue> 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<Map.Entry<Bytes, Optional<byte[]>>> comparing =
Comparator.comparing(
(Map.Entry<Bytes, Optional<byte[]>> a) -> a.getKey().commonPrefixLength(key))
Expand Down

0 comments on commit 8e78bcb

Please sign in to comment.