This commit is contained in:
zzz
2010-08-10 16:17:09 +00:00
parent 8eeabe4409
commit 4323036992
7 changed files with 74 additions and 4 deletions

View File

@@ -58,6 +58,10 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM
//_context.statManager().createRateStat("i2np.readTime", "How long it takes to read an I2NP message", "I2NP", new long[] { 10*60*1000, 60*60*1000 });
}
/**
* Read the whole message (including the type) and throw it away.
* @deprecated Unused, why would you do this
*/
public void readBytes(InputStream in) throws DataFormatException, IOException {
try {
readBytes(in, -1, new byte[1024]);

View File

@@ -224,6 +224,7 @@ public class PeerProfile {
public double getIntegrationValue() { return _integrationValue; }
/**
* is this peer actively failing (aka not worth touching)?
* deprecated - unused - always false
*/
public boolean getIsFailing() { return _isFailing; }
@@ -476,7 +477,9 @@ public class PeerProfile {
private double calculateSpeed() { return _context.speedCalculator().calc(this); }
private double calculateCapacity() { return _context.capacityCalculator().calc(this); }
private double calculateIntegration() { return _context.integrationCalculator().calc(this); }
/** deprecated - unused - always false */
private boolean calculateIsFailing() { return false; }
/** deprecated - unused - always false */
void setIsFailing(boolean val) { _isFailing = val; }
@Override

View File

@@ -703,6 +703,9 @@ public class EstablishState {
* - 4 byte i2p network time as known by the remote side (seconds since the epoch)
* - uninterpreted padding data, up to byte 223
* - xor of the local router's identity hash and the SHA256 of bytes 32 through bytes 223
*
* @return should always be false since nobody ever sends a check info message
*
*/
private static boolean isCheckInfo(I2PAppContext ctx, Hash us, byte first256[]) {
Log log = ctx.logManager().getLog(EstablishState.class);
@@ -742,6 +745,8 @@ public class EstablishState {
}
}
/** @deprecated unused */
/*********
public static void checkHost(String args[]) {
if (args.length != 3) {
System.err.println("Usage: EstablishState ipOrHostname portNum peerHashBase64");
@@ -779,7 +784,9 @@ public class EstablishState {
e.printStackTrace();
}
}
*******/
/*******
public static void main(String args[]) {
if (args.length == 3) {
checkHost(args);
@@ -943,6 +950,7 @@ public class EstablishState {
e.printStackTrace();
}
}
*******/
/**
* Mark a string for extraction by xgettext and translation.

View File

@@ -498,6 +498,8 @@ class BuildHandler {
long nextId = req.readNextTunnelId();
boolean isInGW = req.readIsInboundGateway();
boolean isOutEnd = req.readIsOutboundEndpoint();
// time is in hours, and only for log below - what's the point?
// tunnel-alt-creation.html specifies that this is enforced +/- 1 hour but it is not.
long time = req.readRequestTime();
long now = (_context.clock().now() / (60l*60l*1000l)) * (60*60*1000);
int ourSlot = -1;