Skip to content

Commit

Permalink
Merge pull request #4104 from cbeams/fix-4103
Browse files Browse the repository at this point in the history
Avoid startup failure when bannedSeedNodes arg is empty
  • Loading branch information
ripcurlx committed Mar 31, 2020
2 parents 5faf770 + 0ed5b4e commit 13604b6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ private void reload() {
});

// filter
cache.removeAll(config.bannedSeedNodes.stream().map(NodeAddress::new).collect(Collectors.toSet()));
cache.removeAll(
config.bannedSeedNodes.stream()
.filter(n -> !n.isEmpty())
.map(NodeAddress::new)
.collect(Collectors.toSet()));

log.info("Seed nodes: {}", cache);
} catch (Throwable t) {
Expand Down

0 comments on commit 13604b6

Please sign in to comment.