mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Fix bootstrap node handling for localhost
This commit is contained in:
parent
6fbd717bdb
commit
71df030a11
@ -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() {
|
||||
|
@ -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);
|
||||
|
@ -166,7 +166,7 @@ class MainViewModel implements ViewModel {
|
||||
Utilities.setTimeout(2000, () -> setBitcoinNetworkSyncProgress(walletService.downloadPercentageProperty().get()));
|
||||
|
||||
walletService.numPeersProperty().addListener((observable, oldValue, newValue) -> {
|
||||
|
||||
log.debug("Bitcoin peers " + newValue);
|
||||
numBTCPeers.set(String.valueOf(newValue) + " peers");
|
||||
if ((int) newValue < 1) {
|
||||
if (lostBTCConnectionTimeoutTimer != null)
|
||||
|
@ -112,7 +112,6 @@ public class WithdrawalView extends ActivatableViewAndModel {
|
||||
withdrawFromTextField.textProperty(), amountTextField.textProperty(), withdrawToTextField.textProperty()));
|
||||
table.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
|
||||
if (newValue != null) {
|
||||
|
||||
if (Coin.ZERO.compareTo(newValue.getBalance()) <= 0) {
|
||||
amountTextField.setText(newValue.getBalance().toPlainString());
|
||||
withdrawFromTextField.setText(newValue.getAddressEntry().getAddressString());
|
||||
|
@ -403,6 +403,9 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
||||
buyerState.set(PendingTradesViewModel.BuyerState.REQUEST_WITHDRAWAL);
|
||||
break;
|
||||
|
||||
case WITHDRAW_COMPLETED:
|
||||
break;
|
||||
|
||||
default:
|
||||
log.warn("unhandled viewState " + processState);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user