From db99e98658789cb568bcc893f283c43afd74249d Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 17 Mar 2010 16:15:52 +0000
Subject: [PATCH] display transport cost

---
 .../java/src/net/i2p/router/web/NetDbRenderer.java          | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java
index 715d92c749..3497bc8675 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java
@@ -282,7 +282,11 @@ public class NetDbRenderer {
         }
         for (Iterator iter = info.getAddresses().iterator(); iter.hasNext(); ) {
             RouterAddress addr = (RouterAddress)iter.next();
-            buf.append("<b>").append(DataHelper.stripHTML(addr.getTransportStyle())).append(":</b> ");
+            String style = addr.getTransportStyle();
+            buf.append("<b>").append(DataHelper.stripHTML(style)).append(":</b> ");
+            int cost = addr.getCost();
+            if (!((style.equals("SSU") && cost == 5) || (style.equals("NTCP") && cost == 10)))
+                buf.append('[').append("cost").append('=').append("" + cost).append("] ");
             for (Iterator optIter = addr.getOptions().keySet().iterator(); optIter.hasNext(); ) {
                 String name = (String)optIter.next();
                 String val = addr.getOptions().getProperty(name);
-- 
GitLab