* i2psnark:
- More listing fixes (more thanks to 'backup') - Start end game a little sooner
This commit is contained in:
@ -388,6 +388,7 @@ public class Peer implements Comparable
|
|||||||
* Sets whether or not we are interested in pieces from this peer.
|
* Sets whether or not we are interested in pieces from this peer.
|
||||||
* Defaults to false. When interest is true and this peer unchokes
|
* Defaults to false. When interest is true and this peer unchokes
|
||||||
* us then we start downloading from it. Has no effect when not connected.
|
* us then we start downloading from it. Has no effect when not connected.
|
||||||
|
* @deprecated unused
|
||||||
*/
|
*/
|
||||||
public void setInteresting(boolean interest)
|
public void setInteresting(boolean interest)
|
||||||
{
|
{
|
||||||
|
@ -489,6 +489,13 @@ public class PeerCoordinator implements PeerListener
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This should be somewhat less than the max conns per torrent,
|
||||||
|
* but not too much less, so a torrent doesn't get stuck near the end.
|
||||||
|
* @since 0.7.14
|
||||||
|
*/
|
||||||
|
private static final int END_GAME_THRESHOLD = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns one of pieces in the given BitField that is still wanted or
|
* Returns one of pieces in the given BitField that is still wanted or
|
||||||
* -1 if none of the given pieces are wanted.
|
* -1 if none of the given pieces are wanted.
|
||||||
@ -525,7 +532,7 @@ public class PeerCoordinator implements PeerListener
|
|||||||
// AND if there are almost no wanted pieces left (real end game).
|
// AND if there are almost no wanted pieces left (real end game).
|
||||||
// If we do end game all the time, we generate lots of extra traffic
|
// If we do end game all the time, we generate lots of extra traffic
|
||||||
// when the seeder is super-slow and all the peers are "caught up"
|
// when the seeder is super-slow and all the peers are "caught up"
|
||||||
if (wantedPieces.size() > 4)
|
if (wantedPieces.size() > END_GAME_THRESHOLD)
|
||||||
return -1; // nothing to request and not in end game
|
return -1; // nothing to request and not in end game
|
||||||
// let's not all get on the same piece
|
// let's not all get on the same piece
|
||||||
Collections.shuffle(requested);
|
Collections.shuffle(requested);
|
||||||
|
@ -697,7 +697,7 @@ public class I2PSnarkServlet extends Default {
|
|||||||
if (snark.meta.getFiles() != null)
|
if (snark.meta.getFiles() != null)
|
||||||
icon = "folder";
|
icon = "folder";
|
||||||
else
|
else
|
||||||
icon = toIcon(fullFilename);
|
icon = toIcon(snark.meta.getName());
|
||||||
out.write(toImg(icon));
|
out.write(toImg(icon));
|
||||||
out.write(filename);
|
out.write(filename);
|
||||||
if (remaining == 0 || snark.meta.getFiles() != null)
|
if (remaining == 0 || snark.meta.getFiles() != null)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* i2psnark:
|
* i2psnark:
|
||||||
- More listing fixes
|
- More listing fixes
|
||||||
- Revert choker change
|
- Revert choker change
|
||||||
|
- Start end game a little sooner
|
||||||
* Installer: Disable pack200 in updater again, doesn't work
|
* Installer: Disable pack200 in updater again, doesn't work
|
||||||
on Java 1.5
|
on Java 1.5
|
||||||
* Remove jetty from updater - it's been in for a few
|
* Remove jetty from updater - it's been in for a few
|
||||||
|
@ -18,10 +18,10 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 14;
|
public final static long BUILD = 15;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "-rc";
|
||||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||||
|
Reference in New Issue
Block a user