Cleanup, Set UpdateFX version number

This commit is contained in:
Manfred Karrer 2015-03-13 23:39:11 +01:00
parent 16100e2f8b
commit 6c0b51dc37
7 changed files with 47 additions and 47 deletions

View File

@ -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<ECPoint> UPDATE_SIGNING_KEYS = Crypto.decode("0296CFF54A8B1611499D4C1024E654140AFBB58C505FE4BB7C847B4F4A7C683DF6");
private static final String UPDATES_BASE_URL = "http://bitsquare.io/updateFX/";

View File

@ -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");

View File

@ -39,7 +39,7 @@ public class CheckOfferAvailabilityProtocol {
private final MessageHandler messageHandler;
private boolean isCanceled;
private TaskRunner<CheckOfferAvailabilityModel> sequence;
private TaskRunner<CheckOfferAvailabilityModel> 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();
}
}

View File

@ -53,7 +53,7 @@ public class PlaceOfferProtocol {
///////////////////////////////////////////////////////////////////////////////////////////
public void placeOffer() {
TaskRunner<PlaceOfferModel> sequence = new TaskRunner<>(model,
TaskRunner<PlaceOfferModel> 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();
}
}

View File

@ -107,7 +107,7 @@ public class BuyerAsOffererProtocol {
model.setTradeMessage(tradeMessage);
model.setPeer(peer);
BuyerAsOffererTaskRunner<BuyerAsOffererModel> sequence = new BuyerAsOffererTaskRunner<>(model,
BuyerAsOffererTaskRunner<BuyerAsOffererModel> 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<BuyerAsOffererModel> sequence = new BuyerAsOffererTaskRunner<>(model,
BuyerAsOffererTaskRunner<BuyerAsOffererModel> 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<BuyerAsOffererModel> sequence = new BuyerAsOffererTaskRunner<>(model,
BuyerAsOffererTaskRunner<BuyerAsOffererModel> 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<BuyerAsOffererModel> sequence = new BuyerAsOffererTaskRunner<>(model,
BuyerAsOffererTaskRunner<BuyerAsOffererModel> 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<BuyerAsOffererModel> sequence = new BuyerAsOffererTaskRunner<>(model,
BuyerAsOffererTaskRunner<BuyerAsOffererModel> 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();
}
}

View File

@ -71,7 +71,7 @@ public class SellerAsTakerProtocol {
public void takeOffer() {
model.getTradeMessageService().addMessageHandler(messageHandler);
SellerAsTakerTaskRunner<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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<SellerAsTakerModel> sequence = new SellerAsTakerTaskRunner<>(model,
SellerAsTakerTaskRunner<SellerAsTakerModel> 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();
}
}

View File

@ -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);