Skip to content

Commit 7d92037

Browse files
authored
snap server - log enabled/disabled in config overview (besu-eth#10039)
* log snap server enabled/disabled in config overview * starting snapserver msg at info Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
1 parent 556f982 commit 7d92037

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

app/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public class ConfigurationOverviewBuilder {
7777
private Long targetGasLimit;
7878
private Integer maxBlobsPerTransaction;
7979
private Integer maxBlobsPerBlock;
80+
private static final String SNAP_SYNC_MODE = "SNAP";
8081

8182
/**
8283
* Create a new ConfigurationOverviewBuilder.
@@ -477,6 +478,10 @@ public String build() {
477478

478479
if (syncMode != null) {
479480
lines.add("Sync mode: " + syncMode);
481+
if (syncMode.equalsIgnoreCase(SNAP_SYNC_MODE)) {
482+
final String snapServerStatus = isSnapServerEnabled ? "enabled" : "disabled";
483+
lines.add(" SNAP Sync server " + snapServerStatus);
484+
}
480485
}
481486

482487
if (syncMinPeers != null) {
@@ -548,10 +553,6 @@ public String build() {
548553
lines.add(chainPruningString.toString());
549554
}
550555

551-
if (isSnapServerEnabled) {
552-
lines.add("Snap Sync server enabled");
553-
}
554-
555556
if (isHighSpec) {
556557
lines.add("Experimental high spec configuration enabled");
557558
}

ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/snap/SnapServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public synchronized SnapServer start() {
148148
if (worldStateKeyValueStorage.getDataStorageFormat().isBonsaiFormat()
149149
&& (worldStateStorageCoordinator.isMatchingFlatMode(FlatDbMode.FULL)
150150
|| worldStateStorageCoordinator.isMatchingFlatMode(FlatDbMode.ARCHIVE))) {
151-
LOGGER.debug("Starting SnapServer with Bonsai full flat db");
151+
LOGGER.info("Starting SnapServer with Bonsai full flat db");
152152
var bonsaiArchive =
153153
protocolContext
154154
.map(ProtocolContext::getWorldStateArchive)

0 commit comments

Comments
 (0)