Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for besu 24.12.x #29

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
releaseVersion=0.3.2
besuVersion=24.10.0
releaseVersion=0.4.0
besuVersion=24.12.0

2 changes: 1 addition & 1 deletion gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencyManagement {
}

// junit
dependencySet(group: 'org.junit.jupiter', version: '5.8.2') {
dependencySet(group: 'org.junit.jupiter', version: '5.11.2') {
entry 'junit-jupiter'
entry 'junit-jupiter-api'
entry 'junit-jupiter-engine'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import java.util.List;

import com.google.auto.service.AutoService;
import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.RpcEndpointService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -32,13 +32,13 @@ public class BesuShomeiRpcPlugin implements BesuPlugin {
private static final Logger LOG = LoggerFactory.getLogger(BesuShomeiRpcPlugin.class);

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager serviceManager) {
LOG.debug("Registering RPC plugins");
var methods =
List.of(
new ShomeiGetTrieLogsByRange(ZkTrieLogService.getInstance()),
new ShomeiGetTrieLog(ZkTrieLogService.getInstance()));
context
serviceManager
.getService(RpcEndpointService.class)
.ifPresent(
rpcEndpointService ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import java.util.Optional;

import com.google.auto.service.AutoService;
import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;
import org.hyperledger.besu.plugin.services.TrieLogService;
import org.slf4j.Logger;
Expand All @@ -31,19 +31,19 @@ public class ZkTrieLogPlugin implements BesuPlugin {
private static ShomeiCliOptions options = ShomeiCliOptions.create();

@Override
public void register(final BesuContext besuContext) {
public void register(final ServiceManager serviceManager) {
LOG.info("Registering ZkTrieLog plugin");

LOG.debug("Adding command line params");
final Optional<PicoCLIOptions> cmdlineOptions = besuContext.getService(PicoCLIOptions.class);
final Optional<PicoCLIOptions> cmdlineOptions = serviceManager.getService(PicoCLIOptions.class);

if (cmdlineOptions.isEmpty()) {
throw new IllegalStateException(
"Expecting a PicoCLI options to register CLI options with, but none found.");
}

cmdlineOptions.get().addPicoCLIOptions(NAME, options);
besuContext.addService(TrieLogService.class, ZkTrieLogService.getInstance());
serviceManager.addService(TrieLogService.class, ZkTrieLogService.getInstance());
}

@Override
Expand Down
Loading