Skip to content

Commit

Permalink
feat: update L1FinalizationTagUpdaterPlugin to use linea-besu:plugin-…
Browse files Browse the repository at this point in the history
…api:24.11-delivery39 (#382)
  • Loading branch information
jonesho authored Dec 3, 2024
1 parent bca27b1 commit 0475343
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions finalized-tag-updater/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service-annotations:1.1.1'
compileOnly 'io.consensys.linea-besu:plugin-api:24.7-develop-c0029e6'
compileOnly 'io.consensys.linea-besu:plugin-api:24.11-delivery39'
compileOnly 'info.picocli:picocli:4.7.6'
compileOnly 'io.vertx:vertx-core'

Expand All @@ -44,10 +44,9 @@ dependencies {
implementation ("org.web3j:core:${libs.versions.web3j.get()}") {
exclude group: 'org.slf4j', module: 'slf4j-nop'
}
testImplementation 'io.consensys.linea-besu:plugin-api:24.7-develop-c0029e6'
testImplementation 'io.consensys.linea-besu:plugin-api:24.11-delivery39'
testImplementation 'info.picocli:picocli:4.7.6'
testImplementation 'io.vertx:vertx-core'
testImplementation "org.hyperledger.besu:besu-datatypes:${libs.versions.besu.get()}"
}

tasks.register('copyShadowJarToLocalBesu', Copy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.consensys.linea.PluginCliOptions;
import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.BlockchainService;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;

Expand All @@ -18,15 +19,15 @@ public class L1FinalizationTagUpdaterPlugin implements BesuPlugin {
private LineaL1FinalizationUpdaterService service;
private BlockchainService blockchainService;

@Override
public void register(BesuContext context) {
final PicoCLIOptions cmdlineOptions = context.getService(PicoCLIOptions.class)
.orElseThrow(() -> new IllegalStateException("Failed to obtain PicoCLI options from the BesuContext"));
cmdlineOptions.addPicoCLIOptions(CLI_OPTIONS_PREFIX, cliOptions);
@Override
public void register(final ServiceManager serviceManager) {
final PicoCLIOptions cmdlineOptions = serviceManager.getService(PicoCLIOptions.class)
.orElseThrow(() -> new IllegalStateException("Failed to obtain PicoCLI options from the BesuContext"));
cmdlineOptions.addPicoCLIOptions(CLI_OPTIONS_PREFIX, cliOptions);

blockchainService = context.getService(BlockchainService.class)
.orElseThrow(() -> new RuntimeException("Failed to obtain BlockchainService from the BesuContext."));
}
blockchainService = serviceManager.getService(BlockchainService.class)
.orElseThrow(() -> new RuntimeException("Failed to obtain BlockchainService from the BesuContext."));
}

@Override
public void start() {
Expand Down

0 comments on commit 0475343

Please sign in to comment.