second approach

This commit is contained in:
Stefan Miklosovic 2024-11-15 15:00:10 +01:00
parent 835ce9c5d8
commit 270c198e41
No known key found for this signature in database
GPG Key ID: 32F35CB2F546D93E
1 changed files with 11 additions and 1 deletions

View File

@ -32,6 +32,7 @@ public class ReloadSeeds extends NodeToolCmd
public void execute(NodeProbe probe)
{
PrintStream out = probe.output().out;
List<String> originalSeeds = probe.getSeeds();
List<String> seedList = probe.reloadSeeds();
if (seedList == null)
{
@ -43,7 +44,16 @@ public class ReloadSeeds extends NodeToolCmd
}
else
{
out.println("Updated seed node IP list, excluding the current node's IP: " + String.join(" ", seedList));
if (originalSeeds.equals(seedList))
{
out.println("Seeds have not changed or the seed is equal to the node's address which is meaningless operation. " +
"Seed node IP list, excluding the current node's IP:"
+ String.join(" ", seedList));
}
else
{
out.println("Updated seed node IP list, excluding the current node's IP: " + String.join(" ", seedList));
}
}
}
}