diff --git a/core/src/main/java/io/bitsquare/app/gui/UpdateProcess.java b/core/src/main/java/io/bitsquare/app/gui/UpdateProcess.java index fefde2f54a..6066cd16d1 100644 --- a/core/src/main/java/io/bitsquare/app/gui/UpdateProcess.java +++ b/core/src/main/java/io/bitsquare/app/gui/UpdateProcess.java @@ -52,7 +52,7 @@ public class UpdateProcess { private static final Logger log = LoggerFactory.getLogger(UpdateProcess.class); // Edit version for updateFX - private static final int BUILD_VERSION = 1; + private static final int BUILD_VERSION = 3; private static final List UPDATE_SIGNING_KEYS = Crypto.decode("0296CFF54A8B1611499D4C1024E654140AFBB58C505FE4BB7C847B4F4A7C683DF6"); private static final String UPDATES_BASE_URL = "http://bitsquare.io/updateFX/"; diff --git a/core/src/main/java/io/bitsquare/network/BootstrapNodes.java b/core/src/main/java/io/bitsquare/network/BootstrapNodes.java index 70643018b0..7cd58c429a 100644 --- a/core/src/main/java/io/bitsquare/network/BootstrapNodes.java +++ b/core/src/main/java/io/bitsquare/network/BootstrapNodes.java @@ -30,7 +30,7 @@ public interface BootstrapNodes { Node DEFAULT = DIGITAL_OCEAN_1; /** - * A locally-running {@link io.bitsquare.app.bootstrap.BootstrapNode} instance. + * A locally-running BootstrapNode instance. * Typically used only for testing. Not included in results from {@link #all()}. */ Node LOCALHOST = Node.at("localhost", "127.0.0.1"); diff --git a/core/src/main/java/io/bitsquare/trade/protocol/availability/CheckOfferAvailabilityProtocol.java b/core/src/main/java/io/bitsquare/trade/protocol/availability/CheckOfferAvailabilityProtocol.java index 3fa2baeef6..3d22f64466 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/availability/CheckOfferAvailabilityProtocol.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/availability/CheckOfferAvailabilityProtocol.java @@ -39,7 +39,7 @@ public class CheckOfferAvailabilityProtocol { private final MessageHandler messageHandler; private boolean isCanceled; - private TaskRunner sequence; + private TaskRunner taskRunner; /////////////////////////////////////////////////////////////////////////////////////////// @@ -64,7 +64,7 @@ public class CheckOfferAvailabilityProtocol { public void checkOfferAvailability() { model.getTradeMessageService().addMessageHandler(messageHandler); - sequence = new TaskRunner<>(model, + taskRunner = new TaskRunner<>(model, () -> { log.debug("sequence at onCheckOfferAvailability completed"); }, @@ -72,16 +72,16 @@ public class CheckOfferAvailabilityProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( GetPeerAddress.class, RequestIsOfferAvailable.class ); - sequence.run(); + taskRunner.run(); } public void cancel() { isCanceled = true; - sequence.cancel(); + taskRunner.cancel(); model.getOffer().setState(Offer.State.UNKNOWN); } @@ -100,7 +100,7 @@ public class CheckOfferAvailabilityProtocol { private void handleReportOfferAvailabilityMessage(ReportOfferAvailabilityMessage message) { model.setMessage(message); - sequence = new TaskRunner<>(model, + taskRunner = new TaskRunner<>(model, () -> { log.debug("sequence at handleReportOfferAvailabilityMessage completed"); model.getResultHandler().handleResult(); @@ -109,7 +109,7 @@ public class CheckOfferAvailabilityProtocol { log.error(errorMessage); } ); - sequence.addTasks(ProcessReportOfferAvailabilityMessage.class); - sequence.run(); + taskRunner.addTasks(ProcessReportOfferAvailabilityMessage.class); + taskRunner.run(); } } diff --git a/core/src/main/java/io/bitsquare/trade/protocol/placeoffer/PlaceOfferProtocol.java b/core/src/main/java/io/bitsquare/trade/protocol/placeoffer/PlaceOfferProtocol.java index b125e82192..647471b86b 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/placeoffer/PlaceOfferProtocol.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/placeoffer/PlaceOfferProtocol.java @@ -53,7 +53,7 @@ public class PlaceOfferProtocol { /////////////////////////////////////////////////////////////////////////////////////////// public void placeOffer() { - TaskRunner sequence = new TaskRunner<>(model, + TaskRunner taskRunner = new TaskRunner<>(model, () -> { log.debug("sequence at handleRequestTakeOfferMessage completed"); resultHandler.handleResult(model.getTransaction()); @@ -63,13 +63,13 @@ public class PlaceOfferProtocol { errorMessageHandler.handleErrorMessage(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ValidateOffer.class, CreateOfferFeeTx.class, AddOfferToRemoteOfferBook.class, BroadcastCreateOfferFeeTx.class ); - sequence.run(); + taskRunner.run(); } } diff --git a/core/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAsOffererProtocol.java b/core/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAsOffererProtocol.java index 1eb30e9638..b36a9aa882 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAsOffererProtocol.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAsOffererProtocol.java @@ -107,7 +107,7 @@ public class BuyerAsOffererProtocol { model.setTradeMessage(tradeMessage); model.setPeer(peer); - BuyerAsOffererTaskRunner sequence = new BuyerAsOffererTaskRunner<>(model, + BuyerAsOffererTaskRunner taskRunner = new BuyerAsOffererTaskRunner<>(model, () -> { log.debug("sequence at handleRequestTakeOfferMessage completed"); }, @@ -115,17 +115,17 @@ public class BuyerAsOffererProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessRequestTakeOfferMessage.class, RespondToTakeOfferRequest.class ); - sequence.run(); + taskRunner.run(); } private void handleTakeOfferFeePayedMessage(TakeOfferFeePayedMessage tradeMessage) { model.setTradeMessage(tradeMessage); - BuyerAsOffererTaskRunner sequence = new BuyerAsOffererTaskRunner<>(model, + BuyerAsOffererTaskRunner taskRunner = new BuyerAsOffererTaskRunner<>(model, () -> { log.debug("sequence at handleTakeOfferFeePayedMessage completed"); }, @@ -133,18 +133,18 @@ public class BuyerAsOffererProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessTakeOfferFeePayedMessage.class, CreateDepositTx.class, SendTakerDepositPaymentRequest.class ); - sequence.run(); + taskRunner.run(); } private void handleRequestOffererPublishDepositTxMessage(RequestOffererPublishDepositTxMessage tradeMessage) { model.setTradeMessage(tradeMessage); - BuyerAsOffererTaskRunner sequence = new BuyerAsOffererTaskRunner<>(model, + BuyerAsOffererTaskRunner taskRunner = new BuyerAsOffererTaskRunner<>(model, () -> { log.debug("sequence at handleRequestOffererPublishDepositTxMessage completed"); }, @@ -152,7 +152,7 @@ public class BuyerAsOffererProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessRequestOffererPublishDepositTxMessage.class, VerifyTakerAccount.class, VerifyAndSignContract.class, @@ -160,7 +160,7 @@ public class BuyerAsOffererProtocol { SetupListenerForBlockChainConfirmation.class, SendDepositTxIdToTaker.class ); - sequence.run(); + taskRunner.run(); } @@ -170,7 +170,7 @@ public class BuyerAsOffererProtocol { // User clicked the "bank transfer started" button public void onFiatPaymentStarted() { - BuyerAsOffererTaskRunner sequence = new BuyerAsOffererTaskRunner<>(model, + BuyerAsOffererTaskRunner taskRunner = new BuyerAsOffererTaskRunner<>(model, () -> { log.debug("sequence at handleBankTransferStartedUIEvent completed"); }, @@ -178,12 +178,12 @@ public class BuyerAsOffererProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( SignPayoutTx.class, VerifyTakeOfferFeePayment.class, SendBankTransferInitedMessage.class ); - sequence.run(); + taskRunner.run(); } @@ -194,7 +194,7 @@ public class BuyerAsOffererProtocol { private void handlePayoutTxPublishedMessage(PayoutTxPublishedMessage tradeMessage) { model.setTradeMessage(tradeMessage); - BuyerAsOffererTaskRunner sequence = new BuyerAsOffererTaskRunner<>(model, + BuyerAsOffererTaskRunner taskRunner = new BuyerAsOffererTaskRunner<>(model, () -> { log.debug("sequence at handlePayoutTxPublishedMessage completed"); }, @@ -202,7 +202,7 @@ public class BuyerAsOffererProtocol { log.error(errorMessage); } ); - sequence.addTasks(ProcessPayoutTxPublishedMessage.class); - sequence.run(); + taskRunner.addTasks(ProcessPayoutTxPublishedMessage.class); + taskRunner.run(); } } diff --git a/core/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerAsTakerProtocol.java b/core/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerAsTakerProtocol.java index 46edf23c95..c3e9b605ff 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerAsTakerProtocol.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerAsTakerProtocol.java @@ -71,7 +71,7 @@ public class SellerAsTakerProtocol { public void takeOffer() { model.getTradeMessageService().addMessageHandler(messageHandler); - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleRequestTakeOfferUIEvent completed"); }, @@ -79,11 +79,11 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( GetPeerAddress.class, RequestTakeOffer.class ); - sequence.run(); + taskRunner.run(); } public void cleanup() { @@ -122,7 +122,7 @@ public class SellerAsTakerProtocol { private void handleRespondToTakeOfferRequestMessage(RespondToTakeOfferRequestMessage tradeMessage) { model.setTradeMessage(tradeMessage); - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleRespondToTakeOfferRequestMessage completed"); }, @@ -130,18 +130,18 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessRespondToTakeOfferRequestMessage.class, PayTakeOfferFee.class, SendTakeOfferFeePayedMessage.class ); - sequence.run(); + taskRunner.run(); } private void handleTakerDepositPaymentRequestMessage(TakerDepositPaymentRequestMessage tradeMessage) { model.setTradeMessage(tradeMessage); - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleTakerDepositPaymentRequestMessage completed"); }, @@ -149,20 +149,20 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessTakerDepositPaymentRequestMessage.class, VerifyOffererAccount.class, CreateAndSignContract.class, PayDeposit.class, SendSignedTakerDepositTxAsHex.class ); - sequence.run(); + taskRunner.run(); } private void handleDepositTxPublishedMessage(DepositTxPublishedMessage tradeMessage) { model.setTradeMessage(tradeMessage); - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleDepositTxPublishedMessage completed"); }, @@ -170,17 +170,17 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( ProcessDepositTxPublishedMessage.class, TakerCommitDepositTx.class ); - sequence.run(); + taskRunner.run(); } private void handleBankTransferInitedMessage(BankTransferStartedMessage tradeMessage) { model.setTradeMessage(tradeMessage); - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleBankTransferInitedMessage completed"); model.getTrade().setState(Trade.State.FIAT_PAYMENT_STARTED); @@ -189,8 +189,8 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks(ProcessBankTransferInitedMessage.class); - sequence.run(); + taskRunner.addTasks(ProcessBankTransferInitedMessage.class); + taskRunner.run(); } /////////////////////////////////////////////////////////////////////////////////////////// @@ -199,7 +199,7 @@ public class SellerAsTakerProtocol { // User clicked the "bank transfer received" button, so we release the funds for pay out public void onFiatPaymentReceived() { - SellerAsTakerTaskRunner sequence = new SellerAsTakerTaskRunner<>(model, + SellerAsTakerTaskRunner taskRunner = new SellerAsTakerTaskRunner<>(model, () -> { log.debug("sequence at handleFiatReceivedUIEvent completed"); }, @@ -207,11 +207,11 @@ public class SellerAsTakerProtocol { log.error(errorMessage); } ); - sequence.addTasks( + taskRunner.addTasks( SignAndPublishPayoutTx.class, VerifyOfferFeePayment.class, SendPayoutTxToOfferer.class ); - sequence.run(); + taskRunner.run(); } } diff --git a/core/src/main/java/io/bitsquare/util/handlers/ExceptionHandler.java b/core/src/main/java/io/bitsquare/util/handlers/ExceptionHandler.java index 1c0c9680e7..a009e91964 100644 --- a/core/src/main/java/io/bitsquare/util/handlers/ExceptionHandler.java +++ b/core/src/main/java/io/bitsquare/util/handlers/ExceptionHandler.java @@ -18,7 +18,7 @@ package io.bitsquare.util.handlers; /** - * For reporting throwables only + * For reporting throwable objects only */ public interface ExceptionHandler { void handleException(Throwable throwable);