mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-20 21:04:28 -04:00
Reformat
This commit is contained in:
parent
871db17edf
commit
1b883cf386
62 changed files with 1125 additions and 575 deletions
10
core/pom.xml
10
core/pom.xml
|
@ -188,11 +188,11 @@
|
||||||
<version>1.0.2</version>
|
<version>1.0.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.vinumeris</groupId>
|
<groupId>com.vinumeris</groupId>
|
||||||
<artifactId>updatefx</artifactId>
|
<artifactId>updatefx</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class UpdateProcess {
|
||||||
updater.setOnSucceeded(event -> {
|
updater.setOnSucceeded(event -> {
|
||||||
try {
|
try {
|
||||||
UpdateSummary summary = updater.get();
|
UpdateSummary summary = updater.get();
|
||||||
log.info("summary " +summary.toString());
|
log.info("summary " + summary.toString());
|
||||||
if (summary.descriptions != null && summary.descriptions.size() > 0) {
|
if (summary.descriptions != null && summary.descriptions.size() > 0) {
|
||||||
log.info("One liner: {}", summary.descriptions.get(0).getOneLiner());
|
log.info("One liner: {}", summary.descriptions.get(0).getOneLiner());
|
||||||
log.info("{}", summary.descriptions.get(0).getDescription());
|
log.info("{}", summary.descriptions.get(0).getDescription());
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class Navigation {
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPath = newPath;
|
currentPath = newPath;
|
||||||
persistence.write(this, CURRENT_PATH_KEY, (List<? extends Serializable>)currentPath);
|
persistence.write(this, CURRENT_PATH_KEY, (List<? extends Serializable>) currentPath);
|
||||||
listeners.stream().forEach((e) -> e.onNavigationRequested(currentPath));
|
listeners.stream().forEach((e) -> e.onNavigationRequested(currentPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,22 +45,22 @@ import javafx.scene.control.*;
|
||||||
* <p>
|
* <p>
|
||||||
* ProgressIndicator sets focusTraversable to false.
|
* ProgressIndicator sets focusTraversable to false.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p/>
|
||||||
* <p>
|
* <p/>
|
||||||
* This first example creates a ProgressIndicator with an indeterminate value :
|
* This first example creates a ProgressIndicator with an indeterminate value :
|
||||||
* <pre><code>
|
* <pre><code>
|
||||||
* import javafx.scene.control.ProgressIndicator;
|
* import javafx.scene.control.ProgressIndicator;
|
||||||
* ProgressIndicator p1 = new ProgressIndicator();
|
* ProgressIndicator p1 = new ProgressIndicator();
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
* <p>
|
* <p/>
|
||||||
* <p>
|
* <p/>
|
||||||
* This next example creates a ProgressIndicator which is 25% complete :
|
* This next example creates a ProgressIndicator which is 25% complete :
|
||||||
* <pre><code>
|
* <pre><code>
|
||||||
* import javafx.scene.control.ProgressIndicator;
|
* import javafx.scene.control.ProgressIndicator;
|
||||||
* ProgressIndicator p2 = new ProgressIndicator();
|
* ProgressIndicator p2 = new ProgressIndicator();
|
||||||
* p2.setProgress(0.25F);
|
* p2.setProgress(0.25F);
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
* <p>
|
* <p/>
|
||||||
* Implementation of ProgressIndicator According to JavaFX UI Control API Specification
|
* Implementation of ProgressIndicator According to JavaFX UI Control API Specification
|
||||||
*
|
*
|
||||||
* @since JavaFX 2.0
|
* @since JavaFX 2.0
|
||||||
|
@ -83,7 +83,7 @@ public class ConfidenceProgressIndicator extends Control {
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
/**
|
/**
|
||||||
* Initialize the style class to 'progress-indicator'.
|
* Initialize the style class to 'progress-indicator'.
|
||||||
* <p>
|
* <p/>
|
||||||
* This is the selector class from which CSS can be used to style
|
* This is the selector class from which CSS can be used to style
|
||||||
* this control.
|
* this control.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -126,7 +126,6 @@ class IrcAccountViewModel extends ActivatableWithDataModel<IrcAccountDataModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private InputValidator.ValidationResult validateInput() {
|
private InputValidator.ValidationResult validateInput() {
|
||||||
InputValidator.ValidationResult result = nickNameValidator.validate(dataModel.nickName.get());
|
InputValidator.ValidationResult result = nickNameValidator.validate(dataModel.nickName.get());
|
||||||
if (dataModel.currency.get() == null)
|
if (dataModel.currency.get() == null)
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<Insets bottom="-15"/>
|
<Insets bottom="-15"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<CheckBox fx:id="interceptBeforeCheckBox" onAction="#onCheckBoxChanged" GridPane.rowIndex="3" GridPane.columnIndex="1">
|
<CheckBox fx:id="interceptBeforeCheckBox" onAction="#onCheckBoxChanged" GridPane.rowIndex="3" GridPane.columnIndex="1">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="-15"/>
|
<Insets bottom="-15"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
|
|
@ -50,5 +50,4 @@ class PreferencesViewModel extends ActivatableWithDataModel<PreferencesDataModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,6 @@ class CreateOfferDataModel implements Activatable, DataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void updateBalance(@NotNull Coin balance) {
|
private void updateBalance(@NotNull Coin balance) {
|
||||||
isWalletFunded.set(totalToPayAsCoin.get() != null && balance.compareTo(totalToPayAsCoin.get()) >= 0);
|
isWalletFunded.set(totalToPayAsCoin.get() != null && balance.compareTo(totalToPayAsCoin.get()) >= 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Central point for formatting and input parsing.
|
* Central point for formatting and input parsing.
|
||||||
* <p>
|
* <p/>
|
||||||
* Note that we never use for text input values any coin or currency symbol or code.
|
* Note that we never use for text input values any coin or currency symbol or code.
|
||||||
* BtcFormat does not support
|
* BtcFormat does not support
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,7 +26,7 @@ import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BtcValidator for validating BTC values.
|
* BtcValidator for validating BTC values.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public final class BtcAddressValidator extends InputValidator {
|
public final class BtcAddressValidator extends InputValidator {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BtcValidator for validating BTC values.
|
* BtcValidator for validating BTC values.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public final class BtcValidator extends NumberValidator {
|
public final class BtcValidator extends NumberValidator {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FiatNumberValidator for validating fiat values.
|
* FiatNumberValidator for validating fiat values.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public final class FiatValidator extends NumberValidator {
|
public final class FiatValidator extends NumberValidator {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import io.bitsquare.locale.BSResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for other specialized validators.
|
* Base class for other specialized validators.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public class InputValidator {
|
public class InputValidator {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import io.bitsquare.locale.BSResources;
|
||||||
* Localisation not supported at the moment
|
* Localisation not supported at the moment
|
||||||
* The decimal mark can be either "." or ",". Thousand separators are not supported yet,
|
* The decimal mark can be either "." or ",". Thousand separators are not supported yet,
|
||||||
* but might be added alter with Local support.
|
* but might be added alter with Local support.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public abstract class NumberValidator extends InputValidator {
|
public abstract class NumberValidator extends InputValidator {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BtcValidator for validating BTC values.
|
* BtcValidator for validating BTC values.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public final class OptionalBtcValidator extends NumberValidator {
|
public final class OptionalBtcValidator extends NumberValidator {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FiatNumberValidator for validating fiat values.
|
* FiatNumberValidator for validating fiat values.
|
||||||
* <p>
|
* <p/>
|
||||||
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
|
||||||
*/
|
*/
|
||||||
public final class OptionalFiatValidator extends NumberValidator {
|
public final class OptionalFiatValidator extends NumberValidator {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -255,7 +255,8 @@ public class Offer implements Serializable {
|
||||||
checkNotNull(getMinAmount(), "MinAmount is null");
|
checkNotNull(getMinAmount(), "MinAmount is null");
|
||||||
checkNotNull(getPrice(), "Price is null");
|
checkNotNull(getPrice(), "Price is null");
|
||||||
|
|
||||||
checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + Restrictions.MIN_TRADE_AMOUNT.toFriendlyString());
|
checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + Restrictions.MIN_TRADE_AMOUNT
|
||||||
|
.toFriendlyString());
|
||||||
checkArgument(getAmount().compareTo(Restrictions.MAX_TRADE_AMOUNT) <= 0, "Amount is larger then " + Restrictions.MAX_TRADE_AMOUNT.toFriendlyString());
|
checkArgument(getAmount().compareTo(Restrictions.MAX_TRADE_AMOUNT) <= 0, "Amount is larger then " + Restrictions.MAX_TRADE_AMOUNT.toFriendlyString());
|
||||||
checkArgument(getAmount().compareTo(getMinAmount()) >= 0, "MinAmount is larger then Amount");
|
checkArgument(getAmount().compareTo(getMinAmount()) >= 0, "MinAmount is larger then Amount");
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,9 @@ public class AddOfferToRemoteOfferBook extends Task<PlaceOfferModel> {
|
||||||
(message, throwable) -> {
|
(message, throwable) -> {
|
||||||
failed(throwable);
|
failed(throwable);
|
||||||
});
|
});
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,9 @@ public class CreateOfferFeeTx extends Task<PlaceOfferModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,9 @@ public class ValidateOffer extends Task<PlaceOfferModel> {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,9 @@ public class CreateDepositTx extends Task<BuyerAsOffererModel> {
|
||||||
} catch (InsufficientMoneyException e) {
|
} catch (InsufficientMoneyException e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,9 @@ public class ProcessPayoutTxPublishedMessage extends Task<BuyerAsOffererModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -55,7 +55,9 @@ public class ProcessRequestOffererPublishDepositTxMessage extends Task<BuyerAsOf
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -42,7 +42,9 @@ public class ProcessRequestTakeOfferMessage extends Task<BuyerAsOffererModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -51,7 +51,9 @@ public class ProcessTakeOfferFeePayedMessage extends Task<BuyerAsOffererModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -55,7 +55,9 @@ public class SendBankTransferInitedMessage extends Task<BuyerAsOffererModel> {
|
||||||
failed("Sending BankTransferInitedMessage failed.");
|
failed("Sending BankTransferInitedMessage failed.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,9 @@ public class SendDepositTxIdToTaker extends Task<BuyerAsOffererModel> {
|
||||||
failed("Sending DepositTxPublishedMessage failed.");
|
failed("Sending DepositTxPublishedMessage failed.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,9 @@ public class SendTakerDepositPaymentRequest extends Task<BuyerAsOffererModel> {
|
||||||
failed("RequestTakerDepositPaymentMessage did not arrive at peer");
|
failed("RequestTakerDepositPaymentMessage did not arrive at peer");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,9 @@ public class SetupListenerForBlockChainConfirmation extends Task<BuyerAsOffererM
|
||||||
});
|
});
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,9 @@ public class SignAndPublishDepositTx extends Task<BuyerAsOffererModel> {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,8 +61,10 @@ public class SignPayoutTx extends Task<BuyerAsOffererModel> {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,9 @@ public class VerifyAndSignContract extends Task<BuyerAsOffererModel> {
|
||||||
trade.setTakerContractSignature(signature);
|
trade.setTakerContractSignature(signature);
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class VerifyTakeOfferFeePayment extends Task<BuyerAsOffererModel> {
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void rollBackOnFault() {
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,9 @@ public class VerifyTakerAccount extends Task<BuyerAsOffererModel> {
|
||||||
else {
|
else {
|
||||||
failed("Account registration validation for peer failed.");
|
failed("Account registration validation for peer failed.");
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,9 @@ public class CreateAndSignContract extends Task<SellerAsTakerModel> {
|
||||||
trade.setTakerContractSignature(signature);
|
trade.setTakerContractSignature(signature);
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,9 @@ public class PayDeposit extends Task<SellerAsTakerModel> {
|
||||||
} catch (InsufficientMoneyException e) {
|
} catch (InsufficientMoneyException e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,9 @@ public class ProcessBankTransferInitedMessage extends Task<SellerAsTakerModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -46,7 +46,9 @@ public class ProcessDepositTxPublishedMessage extends Task<SellerAsTakerModel> {
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -50,7 +50,9 @@ public class ProcessTakerDepositPaymentRequestMessage extends Task<SellerAsTaker
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -48,7 +48,9 @@ public class SendPayoutTxToOfferer extends Task<SellerAsTakerModel> {
|
||||||
failed("Sending PayoutTxPublishedMessage failed.");
|
failed("Sending PayoutTxPublishedMessage failed.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class SendSignedTakerDepositTxAsHex extends Task<SellerAsTakerModel> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void rollBackOnFault() {
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,9 @@ public class SignAndPublishPayoutTx extends Task<SellerAsTakerModel> {
|
||||||
} catch (AddressFormatException e) {
|
} catch (AddressFormatException e) {
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,9 @@ public class TakerCommitDepositTx extends Task<SellerAsTakerModel> {
|
||||||
model.getTrade().setState(Trade.State.DEPOSIT_PUBLISHED);
|
model.getTrade().setState(Trade.State.DEPOSIT_PUBLISHED);
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,9 @@ public class VerifyOfferFeePayment extends Task<SellerAsTakerModel> {
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
}*/
|
}*/
|
||||||
complete();
|
complete();
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,9 @@ public class VerifyOffererAccount extends Task<SellerAsTakerModel> {
|
||||||
else {
|
else {
|
||||||
failed("Account registration validation for peer faultHandler.onFault.");
|
failed("Account registration validation for peer faultHandler.onFault.");
|
||||||
}
|
}
|
||||||
} @Override
|
}
|
||||||
protected void rollBackOnFault() {
|
|
||||||
|
@Override
|
||||||
|
protected void rollBackOnFault() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,8 +180,8 @@ public class Utilities {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Empty and delete a folder (and subfolders).
|
* Empty and delete a folder (and subfolders).
|
||||||
* @param folder
|
*
|
||||||
* folder to empty
|
* @param folder folder to empty
|
||||||
*/
|
*/
|
||||||
public static void removeDirectory(final File folder) {
|
public static void removeDirectory(final File folder) {
|
||||||
// check if folder file is a real folder
|
// check if folder file is a real folder
|
||||||
|
|
|
@ -20,7 +20,7 @@ package io.bitsquare.util.taskrunner;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class InterceptTaskException extends RuntimeException{
|
public class InterceptTaskException extends RuntimeException {
|
||||||
private static final Logger log = LoggerFactory.getLogger(InterceptTaskException.class);
|
private static final Logger log = LoggerFactory.getLogger(InterceptTaskException.class);
|
||||||
|
|
||||||
public InterceptTaskException(String message) {
|
public InterceptTaskException(String message) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ public interface Activatable {
|
||||||
void deactivate();
|
void deactivate();
|
||||||
|
|
||||||
|
|
||||||
Activatable NOOP_INSTANCE = new Activatable() {;
|
Activatable NOOP_INSTANCE = new Activatable() {
|
||||||
@Override
|
@Override
|
||||||
public void activate() {
|
public void activate() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,6 @@ public class ViewPath extends ArrayList<Class<? extends View>> {
|
||||||
if (size() == 0)
|
if (size() == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return get(size()-1);
|
return get(size() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class FxmlViewLoader implements ViewLoader {
|
||||||
|
|
||||||
final Class<? extends FxmlView.PathConvention> convention;
|
final Class<? extends FxmlView.PathConvention> convention;
|
||||||
final Class<? extends FxmlView.PathConvention> defaultConvention =
|
final Class<? extends FxmlView.PathConvention> defaultConvention =
|
||||||
(Class<? extends FxmlView.PathConvention>) getDefaultValue(FxmlView.class, "convention");
|
(Class<? extends FxmlView.PathConvention>) getDefaultValue(FxmlView.class, "convention");
|
||||||
|
|
||||||
final String specifiedLocation;
|
final String specifiedLocation;
|
||||||
final String defaultLocation = (String) getDefaultValue(FxmlView.class, "location");
|
final String defaultLocation = (String) getDefaultValue(FxmlView.class, "location");
|
||||||
|
|
|
@ -73,9 +73,9 @@ import static org.junit.Assert.*;
|
||||||
/**
|
/**
|
||||||
* Test bootstrapping, DHT operations like put/get/add/remove and sendDirect in both LAN and WAN environment
|
* Test bootstrapping, DHT operations like put/get/add/remove and sendDirect in both LAN and WAN environment
|
||||||
* Test scenarios in direct connection, auto port forwarding or relay mode.
|
* Test scenarios in direct connection, auto port forwarding or relay mode.
|
||||||
* <p>
|
* <p/>
|
||||||
* To start a bootstrap node code use the {@link io.bitsquare.app.bootstrap.BootstrapNode} class.
|
* To start a bootstrap node code use the {@link io.bitsquare.app.bootstrap.BootstrapNode} class.
|
||||||
* <p>
|
* <p/>
|
||||||
* To configure your test environment edit the static fields for id, IP and port.
|
* To configure your test environment edit the static fields for id, IP and port.
|
||||||
* In the configure method and the connectionType you can define your test scenario.
|
* In the configure method and the connectionType you can define your test scenario.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -120,15 +120,11 @@ public class UtilsDHT2 {
|
||||||
* Creates peers for testing. The first peer (peer[0]) will be used as the master. This means that shutting down
|
* Creates peers for testing. The first peer (peer[0]) will be used as the master. This means that shutting down
|
||||||
* peer[0] will shut down all other peers
|
* peer[0] will shut down all other peers
|
||||||
*
|
*
|
||||||
* @param nrOfPeers
|
* @param nrOfPeers The number of peers to create including the master
|
||||||
* The number of peers to create including the master
|
* @param rnd The random object to create random peer IDs
|
||||||
* @param rnd
|
* @param port The port where the master peer will listen to
|
||||||
* The random object to create random peer IDs
|
|
||||||
* @param port
|
|
||||||
* The port where the master peer will listen to
|
|
||||||
* @return All the peers, with the master peer at position 0 -> peer[0]
|
* @return All the peers, with the master peer at position 0 -> peer[0]
|
||||||
* @throws Exception
|
* @throws Exception If the creation of nodes fail.
|
||||||
* If the creation of nodes fail.
|
|
||||||
*/
|
*/
|
||||||
public static PeerDHT[] createNodes(int nrOfPeers, Random rnd, int port, AutomaticFuture automaticFuture,
|
public static PeerDHT[] createNodes(int nrOfPeers, Random rnd, int port, AutomaticFuture automaticFuture,
|
||||||
boolean maintenance) throws Exception {
|
boolean maintenance) throws Exception {
|
||||||
|
@ -210,8 +206,7 @@ public class UtilsDHT2 {
|
||||||
* Perfect routing, where each neighbor has contacted each other. This means that for small number of peers, every
|
* Perfect routing, where each neighbor has contacted each other. This means that for small number of peers, every
|
||||||
* peer knows every other peer.
|
* peer knows every other peer.
|
||||||
*
|
*
|
||||||
* @param peers
|
* @param peers The peers taking part in the p2p network.
|
||||||
* The peers taking part in the p2p network.
|
|
||||||
*/
|
*/
|
||||||
public static void perfectRouting(PeerDHT... peers) {
|
public static void perfectRouting(PeerDHT... peers) {
|
||||||
for (int i = 0; i < peers.length; i++) {
|
for (int i = 0; i < peers.length; i++) {
|
||||||
|
|
13
pom.xml
13
pom.xml
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>io.bitsquare</groupId>
|
<groupId>io.bitsquare</groupId>
|
||||||
|
@ -93,11 +94,11 @@
|
||||||
<artifactId>bitcoinj-core</artifactId>
|
<artifactId>bitcoinj-core</artifactId>
|
||||||
<version>0.12.2</version>
|
<version>0.12.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-jdk14</artifactId>
|
<artifactId>slf4j-jdk14</artifactId>
|
||||||
<version>1.7.7</version>
|
<version>1.7.7</version>
|
||||||
</dependency>-->
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue