Merge pull request #4104 from cbeams/fix-4103

Avoid startup failure when bannedSeedNodes arg is empty
This commit is contained in:
Christoph Atteneder 2020-03-31 11:01:05 +02:00 committed by GitHub
commit 13604b61e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,11 @@ public class DefaultSeedNodeRepository implements SeedNodeRepository {
});
// 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) {