\n");
} else {
- buf.append("" + _t("Peer info for") + ": ").append(hash).append("\n");
+ buf.append("" + _t("Router") + ": ").append(hash).append("\n");
if (!full) {
buf.append("[").append(_t("Full entry")).append("]");
}
@@ -558,14 +575,21 @@ class SybilRenderer {
if (prof != null) {
long heard = prof.getFirstHeardAbout();
if (heard > 0) {
- long age = now - heard;
- if (age > 0) {
- buf.append("First heard about: ")
- .append(_t("{0} ago", DataHelper.formatDuration2(age))).append(" \n");
- } else {
- // shouldnt happen
- buf.append("First heard about: in ").append(DataHelper.formatDuration2(0-age)).append("??? \n");
- }
+ long age = Math.max(now - heard, 1);
+ buf.append("First heard about: ")
+ .append(_t("{0} ago", DataHelper.formatDuration2(age))).append(" \n");
+ }
+ heard = prof.getLastHeardAbout();
+ if (heard > 0) {
+ long age = Math.max(now - heard, 1);
+ buf.append("Last heard about: ")
+ .append(_t("{0} ago", DataHelper.formatDuration2(age))).append(" \n");
+ }
+ heard = prof.getLastHeardFrom();
+ if (heard > 0) {
+ long age = Math.max(now - heard, 1);
+ buf.append("Last heard from: ")
+ .append(_t("{0} ago", DataHelper.formatDuration2(age))).append(" \n");
}
// any other profile stuff?
}
@@ -596,7 +620,8 @@ class SybilRenderer {
Map |