Skip to content

Commit ffda479

Browse files
thinkAfCodGrapeBaBa
authored andcommitted
fix: add resource config pattern
1 parent ed8e1a6 commit ffda479

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

hildr-node/src/main/java/io/optimism/runner/Runner.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private Tuple2<Boolean, OpEthBlock> isEpochBoundary(
399399
"could not find setL1BlockValues tx in the epoch boundary" + " search")))
400400
.getInput();
401401
byte[] sequenceNumber;
402-
if (block.getBlock().getTimestamp().compareTo(this.config.chainConfig().ecotoneTime()) >= 0) {
402+
if (this.config.chainConfig().isEcotone(block.getBlock().getTimestamp())) {
403403
// this is ecotone block, read sequence number from 12 to 20
404404
sequenceNumber = ArrayUtils.subarray(Numeric.hexStringToByteArray(txInput), 12, 20);
405405
} else {
@@ -438,7 +438,9 @@ protected void run() throws Exception {
438438
@Override
439439
protected void shutDown() {
440440
LOGGER.info("runner shut down");
441-
driver.stopAsync().awaitTerminated();
441+
if (driver != null) {
442+
driver.stopAsync().awaitTerminated();
443+
}
442444
LOGGER.info("stopped driver");
443445
}
444446

hildr-node/src/main/resources/META-INF/native-image/resource-config.json

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
"pattern":"\\QMETA-INF/native/libnetty_resolver_dns_native_macos_aarch_64.jnilib\\E"
1111
}, {
1212
"pattern":"\\QMETA-INF/native/libnetty_resolver_dns_native_macos_x86_64.jnilib\\E"
13+
}, {
14+
"pattern":"\\Qlib/osx-aarch64/libbrotli.dylib\\E"
15+
}, {
16+
"pattern":"\\Qlib/osx-x86_64/libbrotli.dylib\\E"
17+
}, {
18+
"pattern":"\\Qlib/linux-aarch64/libbrotli.so\\E"
19+
}, {
20+
"pattern":"\\Qlib/linux-x86_64/libbrotli.so\\E"
21+
}, {
22+
"pattern":"\\Qlib/windows-aarch64/brotli.dll\\E"
23+
}, {
24+
"pattern":"\\Qlib/windows-x86_64/brotli.dll\\E"
1325
}, {
1426
"pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E"
1527
}, {

hildr-node/src/test/java/io/optimism/l1/InnerWatcherTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.optimism.l1;
22

3-
import static org.junit.jupiter.api.Assertions.assertEquals;
3+
import static org.junit.jupiter.api.Assertions.assertTrue;
44

55
import io.optimism.TestConstants;
66
import io.optimism.config.Config;
@@ -56,6 +56,6 @@ void testTryIngestBlock() throws Exception {
5656
var watcher = this.createWatcher(null, queue);
5757
watcher.startUp();
5858
watcher.tryIngestBlock();
59-
assertEquals(1, queue.size());
59+
assertTrue(queue.size() > 0);
6060
}
6161
}

0 commit comments

Comments
 (0)