Skip to content

Commit 8fe97d9

Browse files
committed
Take CLI default when storage empty
1 parent 4861a14 commit 8fe97d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: validator/api/src/main/java/tech/pegasys/teku/validator/api/UpdatableGraffitiProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public UpdatableGraffitiProvider(
4343

4444
@Override
4545
public Optional<Bytes32> get() {
46-
return getGraffitiFromStorage().filter(this::graffitiNotEmpty).or(defaultProvider::get);
46+
return getGraffitiFromStorage().or(defaultProvider::get);
4747
}
4848

4949
private Optional<Bytes32> getGraffitiFromStorage() {
@@ -52,7 +52,7 @@ private Optional<Bytes32> getGraffitiFromStorage() {
5252
}
5353

5454
try {
55-
return Optional.of(GraffitiParser.loadFromFile(graffitiPath));
55+
return Optional.of(GraffitiParser.loadFromFile(graffitiPath)).filter(this::graffitiNotEmpty);
5656
} catch (GraffitiLoaderException | IllegalArgumentException e) {
5757
LOG.warn("Unable to read graffiti from storage", e);
5858
return Optional.empty();

0 commit comments

Comments
 (0)