Skip to content

Commit

Permalink
fix: add resource config pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod authored and GrapeBaBa committed Jun 13, 2024
1 parent ed8e1a6 commit ffda479
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions hildr-node/src/main/java/io/optimism/runner/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private Tuple2<Boolean, OpEthBlock> isEpochBoundary(
"could not find setL1BlockValues tx in the epoch boundary" + " search")))
.getInput();
byte[] sequenceNumber;
if (block.getBlock().getTimestamp().compareTo(this.config.chainConfig().ecotoneTime()) >= 0) {
if (this.config.chainConfig().isEcotone(block.getBlock().getTimestamp())) {
// this is ecotone block, read sequence number from 12 to 20
sequenceNumber = ArrayUtils.subarray(Numeric.hexStringToByteArray(txInput), 12, 20);
} else {
Expand Down Expand Up @@ -438,7 +438,9 @@ protected void run() throws Exception {
@Override
protected void shutDown() {
LOGGER.info("runner shut down");
driver.stopAsync().awaitTerminated();
if (driver != null) {
driver.stopAsync().awaitTerminated();
}
LOGGER.info("stopped driver");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
"pattern":"\\QMETA-INF/native/libnetty_resolver_dns_native_macos_aarch_64.jnilib\\E"
}, {
"pattern":"\\QMETA-INF/native/libnetty_resolver_dns_native_macos_x86_64.jnilib\\E"
}, {
"pattern":"\\Qlib/osx-aarch64/libbrotli.dylib\\E"
}, {
"pattern":"\\Qlib/osx-x86_64/libbrotli.dylib\\E"
}, {
"pattern":"\\Qlib/linux-aarch64/libbrotli.so\\E"
}, {
"pattern":"\\Qlib/linux-x86_64/libbrotli.so\\E"
}, {
"pattern":"\\Qlib/windows-aarch64/brotli.dll\\E"
}, {
"pattern":"\\Qlib/windows-x86_64/brotli.dll\\E"
}, {
"pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E"
}, {
Expand Down
4 changes: 2 additions & 2 deletions hildr-node/src/test/java/io/optimism/l1/InnerWatcherTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.optimism.l1;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import io.optimism.TestConstants;
import io.optimism.config.Config;
Expand Down Expand Up @@ -56,6 +56,6 @@ void testTryIngestBlock() throws Exception {
var watcher = this.createWatcher(null, queue);
watcher.startUp();
watcher.tryIngestBlock();
assertEquals(1, queue.size());
assertTrue(queue.size() > 0);
}
}

0 comments on commit ffda479

Please sign in to comment.