Console: More LS2 debug output

I2CP: Bump min LS2 router version for release
This commit is contained in:
zzz
2019-01-11 14:44:33 +00:00
parent 17228def91
commit b62732b5b3
3 changed files with 21 additions and 4 deletions

View File

@ -32,6 +32,7 @@ import net.i2p.data.Destination;
import net.i2p.data.Hash;
import net.i2p.data.Lease;
import net.i2p.data.LeaseSet;
import net.i2p.data.LeaseSet2;
import net.i2p.data.router.RouterAddress;
import net.i2p.data.router.RouterInfo;
import net.i2p.router.RouterContext;
@ -519,11 +520,21 @@ class NetDbRenderer {
median = dist;
}
buf.append("&nbsp;&nbsp;<b>Distance: </b>").append(fmt.format(biLog2(dist)));
buf.append("&nbsp;&nbsp;<b>Type: </b>").append(ls.getType());
int type = ls.getType();
buf.append("&nbsp;&nbsp;<b>Type: </b>").append(type);
if (type != DatabaseEntry.KEY_TYPE_LEASESET) {
LeaseSet2 ls2 = (LeaseSet2) ls;
buf.append("&nbsp;&nbsp;<b>Unpublished? </b>").append(ls2.isUnpublished());
boolean isOff = ls2.isOffline();
buf.append("&nbsp;&nbsp;<b>Offline signed? </b>").append(isOff);
if (isOff)
buf.append("&nbsp;&nbsp;<b>Type: </b>").append(ls2.getTransientSigningKey().getType());
}
buf.append("</td></tr>\n<tr><td colspan=\"2\">");
//buf.append(dest.toBase32()).append("<br>");
buf.append("<b>Signature type:</b> ").append(dest.getSigningPublicKey().getType());
buf.append("&nbsp;&nbsp;<b>Encryption Key:</b> ").append(ls.getEncryptionKey().toBase64().substring(0, 20)).append("&hellip;");
if (type != DatabaseEntry.KEY_TYPE_META_LS2)
buf.append("&nbsp;&nbsp;<b>Encryption Key:</b> ").append(ls.getEncryptionKey().toBase64().substring(0, 20)).append("&hellip;");
buf.append("</td></tr>\n<tr><td colspan=\"2\">");
buf.append("<b>Routing Key:</b> ").append(ls.getRoutingKey().toBase64());
buf.append("</td></tr>");

View File

@ -209,8 +209,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
private static final long MAX_SEND_WAIT = 10*1000;
private static final String MIN_FAST_VERSION = "0.9.4";
////// TESTING, change to 38 before release
private static final String MIN_LS2_VERSION = "0.9.37";
private static final String MIN_LS2_VERSION = "0.9.38";
/** @param routerVersion as rcvd in the SetDateMessage, may be null for very old routers */
void dateUpdated(String routerVersion) {

View File

@ -120,6 +120,13 @@ public class LeaseSet2 extends LeaseSet {
return (_flags & FLAG_OFFLINE_KEYS) != 0;
}
/**
* @return transient public key or null if not offline signed
*/
public SigningPublicKey getTransientSigningKey() {
return _transientSigningPublicKey;
}
/**
* Destination must be previously set.
*