Fix bootstrap node handling for localhost

This commit is contained in:
Manfred Karrer 2015-05-22 23:28:38 +02:00
parent 6fbd717bdb
commit 71df030a11
5 changed files with 7 additions and 4 deletions

View file

@ -110,7 +110,7 @@ public class BootstrapNodes {
}
public Node getRandomDiscoverNode() {
return bootstrapNodes.get(new Random().nextInt(rawBootstrapNodes.size()));
return bootstrapNodes.get(new Random().nextInt(bootstrapNodes.size()));
}
public List<Node> getBootstrapNodes() {

View file

@ -52,7 +52,8 @@ import org.slf4j.LoggerFactory;
public class TomP2POfferBookService extends TomP2PDHTService implements OfferBookService {
private static final Logger log = LoggerFactory.getLogger(TomP2POfferBookService.class);
private static final int TTL = 30 * 24 * 60 * 60; // the offer is default 30 days valid
//private static final int TTL = 30 * 24 * 60 * 60; // the offer is default 30 days valid
private static final int TTL = 2 * 60 * 60; // for testing the offer is only 2 hour valid
private final List<Listener> offerRepositoryListeners = new ArrayList<>();
private final LongProperty invalidationTimestamp = new SimpleLongProperty(0);