mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-07 06:32:47 -04:00
Cleanup from code inspect
This commit is contained in:
parent
f0d9a5d81e
commit
232270bf86
32 changed files with 84 additions and 289 deletions
|
@ -31,7 +31,6 @@ import io.bitsquare.offer.tomp2p.TomP2POfferModule;
|
||||||
import io.bitsquare.persistence.Persistence;
|
import io.bitsquare.persistence.Persistence;
|
||||||
import io.bitsquare.settings.Preferences;
|
import io.bitsquare.settings.Preferences;
|
||||||
import io.bitsquare.trade.TradeMessageModule;
|
import io.bitsquare.trade.TradeMessageModule;
|
||||||
import io.bitsquare.trade.TradeModule;
|
|
||||||
import io.bitsquare.trade.tomp2p.TomP2PTradeMessageModule;
|
import io.bitsquare.trade.tomp2p.TomP2PTradeMessageModule;
|
||||||
import io.bitsquare.user.User;
|
import io.bitsquare.user.User;
|
||||||
|
|
||||||
|
@ -72,7 +71,6 @@ class BitsquareAppModule extends BitsquareModule {
|
||||||
install(networkModule());
|
install(networkModule());
|
||||||
install(bitcoinModule());
|
install(bitcoinModule());
|
||||||
install(cryptoModule());
|
install(cryptoModule());
|
||||||
install(tradeModule());
|
|
||||||
install(tradeMessageModule());
|
install(tradeMessageModule());
|
||||||
install(offerModule());
|
install(offerModule());
|
||||||
install(arbitratorMessageModule());
|
install(arbitratorMessageModule());
|
||||||
|
@ -95,10 +93,6 @@ class BitsquareAppModule extends BitsquareModule {
|
||||||
return new CryptoModule(env);
|
return new CryptoModule(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TradeModule tradeModule() {
|
|
||||||
return new TradeModule(env);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TradeMessageModule tradeMessageModule() {
|
protected TradeMessageModule tradeMessageModule() {
|
||||||
return new TomP2PTradeMessageModule(env);
|
return new TomP2PTradeMessageModule(env);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static com.google.inject.internal.util.$Preconditions.*;
|
import static com.google.inject.internal.util.$Preconditions.*;
|
||||||
|
|
||||||
//
|
// TradeService handles all trade relevant transactions as a delegate for WalletService
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Deposit tx:
|
Deposit tx:
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.AddressFormatException;
|
import org.bitcoinj.core.AddressFormatException;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.DownloadListener;
|
import org.bitcoinj.core.DownloadListener;
|
||||||
import org.bitcoinj.core.ECKey;
|
|
||||||
import org.bitcoinj.core.InsufficientMoneyException;
|
import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
import org.bitcoinj.core.NetworkParameters;
|
import org.bitcoinj.core.NetworkParameters;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
@ -514,7 +513,6 @@ public class WalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Withdrawal
|
// Withdrawal
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -547,71 +545,6 @@ public class WalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Trade process
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
public TransactionDataResult offererCreatesDepositTxInputs(Coin inputAmount, AddressEntry addressInfo) throws InsufficientMoneyException,
|
|
||||||
TransactionVerificationException, WalletException {
|
|
||||||
|
|
||||||
// We pay the tx fee 2 times to the deposit tx:
|
|
||||||
// 1. Will be spent when publishing the deposit tx (paid by offerer)
|
|
||||||
// 2. Will be added to the MS amount, so when publishing the payout tx the fee is already there and the outputs are not changed by fee reduction
|
|
||||||
// The fee for the payout will be paid by the taker.
|
|
||||||
|
|
||||||
// inputAmount includes the tx fee. So we subtract the fee to get the dummyOutputAmount.
|
|
||||||
Coin dummyOutputAmount = inputAmount.subtract(FeePolicy.TX_FEE);
|
|
||||||
|
|
||||||
Transaction dummyTX = new Transaction(params);
|
|
||||||
// The output is just used to get the right inputs and change outputs, so we use an anonymous ECKey, as it will never be used for anything.
|
|
||||||
// We don't care about fee calculation differences between the real tx and that dummy tx as we use a static tx fee.
|
|
||||||
TransactionOutput dummyOutput = new TransactionOutput(params, dummyTX, dummyOutputAmount, new ECKey().toAddress(params));
|
|
||||||
dummyTX.addOutput(dummyOutput);
|
|
||||||
|
|
||||||
// Fin the needed inputs to pay the output, optional add change output.
|
|
||||||
// Normally only 1 input and no change output is used, but we support multiple inputs and outputs. Our spending transaction output is from the create
|
|
||||||
// offer fee payment. In future changes (in case of no offer fee) multiple inputs might become used.
|
|
||||||
addAvailableInputsAndChangeOutputs(dummyTX, addressInfo);
|
|
||||||
|
|
||||||
// The completeTx() call signs the input, but we don't want to pass over signed tx inputs
|
|
||||||
// But to be safe and to support future changes (in case of no offer fee) we handle potential multiple inputs
|
|
||||||
removeSignatures(dummyTX);
|
|
||||||
|
|
||||||
verifyTransaction(dummyTX);
|
|
||||||
checkWalletConsistency();
|
|
||||||
|
|
||||||
// The created tx looks like:
|
|
||||||
*//*
|
|
||||||
IN[0] any input > inputAmount (including tx fee) (unsigned)
|
|
||||||
IN[1...n] optional inputs supported, but currently there is just 1 input (unsigned)
|
|
||||||
OUT[0] dummyOutputAmount (inputAmount - tx fee)
|
|
||||||
OUT[1] Optional Change = inputAmount - dummyOutputAmount - tx fee
|
|
||||||
OUT[2...n] optional more outputs are supported, but currently there is just max. 1 optional change output
|
|
||||||
*//*
|
|
||||||
|
|
||||||
printTxWithInputs("dummyTX", dummyTX);
|
|
||||||
|
|
||||||
List<TransactionOutput> connectedOutputsForAllInputs = new ArrayList<>();
|
|
||||||
for (TransactionInput input : dummyTX.getInputs()) {
|
|
||||||
connectedOutputsForAllInputs.add(input.getConnectedOutput());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only save offerer outputs, the MS output is ignored
|
|
||||||
List<TransactionOutput> outputs = new ArrayList<>();
|
|
||||||
for (TransactionOutput output : dummyTX.getOutputs()) {
|
|
||||||
if (output.equals(dummyOutput))
|
|
||||||
continue;
|
|
||||||
outputs.add(output);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new TransactionDataResult(connectedOutputsForAllInputs, outputs);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Private methods
|
// Private methods
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -639,53 +572,6 @@ public class WalletService {
|
||||||
// Inner classes
|
// Inner classes
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public class TransactionDataResult {
|
|
||||||
private List<TransactionOutput> connectedOutputsForAllInputs;
|
|
||||||
private List<TransactionOutput> outputs;
|
|
||||||
private Transaction depositTx;
|
|
||||||
|
|
||||||
|
|
||||||
private Transaction payoutTx;
|
|
||||||
private ECKey.ECDSASignature offererSignature;
|
|
||||||
|
|
||||||
public TransactionDataResult(List<TransactionOutput> connectedOutputsForAllInputs, List<TransactionOutput> outputs) {
|
|
||||||
this.connectedOutputsForAllInputs = connectedOutputsForAllInputs;
|
|
||||||
this.outputs = outputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TransactionDataResult(Transaction depositTx, List<TransactionOutput> connectedOutputsForAllInputs, List<TransactionOutput> outputs) {
|
|
||||||
this.depositTx = depositTx;
|
|
||||||
this.connectedOutputsForAllInputs = connectedOutputsForAllInputs;
|
|
||||||
this.outputs = outputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TransactionDataResult(Transaction payoutTx, ECKey.ECDSASignature offererSignature) {
|
|
||||||
|
|
||||||
this.payoutTx = payoutTx;
|
|
||||||
this.offererSignature = offererSignature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TransactionOutput> getOutputs() {
|
|
||||||
return outputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TransactionOutput> getConnectedOutputsForAllInputs() {
|
|
||||||
return connectedOutputsForAllInputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Transaction getDepositTx() {
|
|
||||||
return depositTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Transaction getPayoutTx() {
|
|
||||||
return payoutTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ECKey.ECDSASignature getOffererSignature() {
|
|
||||||
return offererSignature;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ObservableDownloadListener extends DownloadListener {
|
private static class ObservableDownloadListener extends DownloadListener {
|
||||||
|
|
||||||
private final Subject<Double, Double> subject = BehaviorSubject.create(0d);
|
private final Subject<Double, Double> subject = BehaviorSubject.create(0d);
|
||||||
|
|
|
@ -29,7 +29,6 @@ import io.bitsquare.offer.Offer;
|
||||||
import io.bitsquare.offer.OfferBookService;
|
import io.bitsquare.offer.OfferBookService;
|
||||||
import io.bitsquare.offer.OpenOffer;
|
import io.bitsquare.offer.OpenOffer;
|
||||||
import io.bitsquare.persistence.Persistence;
|
import io.bitsquare.persistence.Persistence;
|
||||||
import io.bitsquare.trade.handlers.MessageHandler;
|
|
||||||
import io.bitsquare.trade.handlers.TransactionResultHandler;
|
import io.bitsquare.trade.handlers.TransactionResultHandler;
|
||||||
import io.bitsquare.trade.listeners.SendMessageListener;
|
import io.bitsquare.trade.listeners.SendMessageListener;
|
||||||
import io.bitsquare.trade.protocol.availability.CheckOfferAvailabilityModel;
|
import io.bitsquare.trade.protocol.availability.CheckOfferAvailabilityModel;
|
||||||
|
@ -81,7 +80,6 @@ public class TradeManager {
|
||||||
private final ObservableMap<String, OpenOffer> openOffers = FXCollections.observableHashMap();
|
private final ObservableMap<String, OpenOffer> openOffers = FXCollections.observableHashMap();
|
||||||
private final ObservableMap<String, Trade> pendingTrades = FXCollections.observableHashMap();
|
private final ObservableMap<String, Trade> pendingTrades = FXCollections.observableHashMap();
|
||||||
private final ObservableMap<String, Trade> closedTrades = FXCollections.observableHashMap();
|
private final ObservableMap<String, Trade> closedTrades = FXCollections.observableHashMap();
|
||||||
private final MessageHandler messageHandler;
|
|
||||||
|
|
||||||
private Trade currentPendingTrade;
|
private Trade currentPendingTrade;
|
||||||
|
|
||||||
|
@ -118,9 +116,8 @@ public class TradeManager {
|
||||||
if (closedTradesObject instanceof Map) {
|
if (closedTradesObject instanceof Map) {
|
||||||
closedTrades.putAll((Map<String, Trade>) closedTradesObject);
|
closedTrades.putAll((Map<String, Trade>) closedTradesObject);
|
||||||
}
|
}
|
||||||
messageHandler = this::handleMessage;
|
|
||||||
|
|
||||||
tradeMessageService.addMessageHandler(messageHandler);
|
tradeMessageService.addMessageHandler(this::handleMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When all services are initialized we create the protocols for our open offers (which will listen for take offer requests)
|
// When all services are initialized we create the protocols for our open offers (which will listen for take offer requests)
|
||||||
|
@ -190,9 +187,7 @@ public class TradeManager {
|
||||||
createBuyerAcceptsOfferProtocol(openOffer);
|
createBuyerAcceptsOfferProtocol(openOffer);
|
||||||
resultHandler.handleResult(transaction);
|
resultHandler.handleResult(transaction);
|
||||||
},
|
},
|
||||||
(message) -> {
|
(message) -> errorMessageHandler.handleErrorMessage(message)
|
||||||
errorMessageHandler.handleErrorMessage(message);
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
placeOfferProtocol.placeOffer();
|
placeOfferProtocol.placeOffer();
|
||||||
|
@ -249,7 +244,7 @@ public class TradeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFiatPaymentStarted(String tradeId) {
|
public void onFiatPaymentStarted(String tradeId) {
|
||||||
// TODO remove if check when peristence is impl.
|
// TODO remove if check when persistence is impl.
|
||||||
if (buyerAcceptsOfferProtocolMap.containsKey(tradeId)) {
|
if (buyerAcceptsOfferProtocolMap.containsKey(tradeId)) {
|
||||||
buyerAcceptsOfferProtocolMap.get(tradeId).onFiatPaymentStarted();
|
buyerAcceptsOfferProtocolMap.get(tradeId).onFiatPaymentStarted();
|
||||||
persistPendingTrades();
|
persistPendingTrades();
|
||||||
|
@ -442,9 +437,9 @@ public class TradeManager {
|
||||||
closedTrades.put(trade.getId(), trade);
|
closedTrades.put(trade.getId(), trade);
|
||||||
persistClosedTrades();
|
persistClosedTrades();
|
||||||
}
|
}
|
||||||
else {
|
/*else {
|
||||||
// TODO add failed trades to history
|
// TODO add failed trades to history
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disposeCheckOfferAvailabilityRequest(Offer offer) {
|
private void disposeCheckOfferAvailabilityRequest(Offer offer) {
|
||||||
|
@ -456,7 +451,7 @@ public class TradeManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOfferOpen(String offerId) {
|
boolean isOfferOpen(String offerId) {
|
||||||
// Don't use openOffers as the offer gets removed async from DHT, but is added sync to pendingTrades
|
// Don't use openOffers as the offer gets removed async from DHT, but is added sync to pendingTrades
|
||||||
return !pendingTrades.containsKey(offerId) && !closedTrades.containsKey(offerId);
|
return !pendingTrades.containsKey(offerId) && !closedTrades.containsKey(offerId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of Bitsquare.
|
|
||||||
*
|
|
||||||
* Bitsquare is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* Bitsquare is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
|
||||||
* License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.bitsquare.trade;
|
|
||||||
|
|
||||||
import io.bitsquare.BitsquareModule;
|
|
||||||
|
|
||||||
import com.google.inject.Singleton;
|
|
||||||
|
|
||||||
import org.springframework.core.env.Environment;
|
|
||||||
|
|
||||||
public class TradeModule extends BitsquareModule {
|
|
||||||
|
|
||||||
public TradeModule(Environment env) {
|
|
||||||
super(env);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
bind(TradeManager.class).in(Singleton.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -90,7 +90,7 @@ public class CheckOfferAvailabilityProtocol {
|
||||||
// Incoming message handling
|
// Incoming message handling
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void handleMessage(Message message, Peer sender) {
|
private void handleMessage(Message message, @SuppressWarnings("UnusedParameters") Peer sender) {
|
||||||
if (!isCanceled) {
|
if (!isCanceled) {
|
||||||
if (message instanceof ReportOfferAvailabilityMessage)
|
if (message instanceof ReportOfferAvailabilityMessage)
|
||||||
handleReportOfferAvailabilityMessage((ReportOfferAvailabilityMessage) message);
|
handleReportOfferAvailabilityMessage((ReportOfferAvailabilityMessage) message);
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
public class ReportOfferAvailabilityMessage implements Serializable, OfferMessage {
|
public class ReportOfferAvailabilityMessage implements Serializable, OfferMessage {
|
||||||
private static final long serialVersionUID = 6177387534187739018L;
|
private static final long serialVersionUID = 6177387534187739018L;
|
||||||
|
|
||||||
private final String offerId;
|
private final String offerId;
|
||||||
private final boolean isOfferOpen;
|
private final boolean isOfferOpen;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.io.Serializable;
|
||||||
// That msg is used to ping the offerer if he is online and if the offer is still available
|
// That msg is used to ping the offerer if he is online and if the offer is still available
|
||||||
public class RequestIsOfferAvailableMessage implements Serializable, OfferMessage {
|
public class RequestIsOfferAvailableMessage implements Serializable, OfferMessage {
|
||||||
private static final long serialVersionUID = 4630151440192191798L;
|
private static final long serialVersionUID = 4630151440192191798L;
|
||||||
|
|
||||||
private final String offerId;
|
private final String offerId;
|
||||||
|
|
||||||
public RequestIsOfferAvailableMessage(String offerId) {
|
public RequestIsOfferAvailableMessage(String offerId) {
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class GetPeerAddress extends Task<CheckOfferAvailabilityModel> {
|
||||||
log.trace("Found peer: " + peer.toString());
|
log.trace("Found peer: " + peer.toString());
|
||||||
|
|
||||||
model.setPeer(peer);
|
model.setPeer(peer);
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ public class PlaceOfferProtocol {
|
||||||
private static final Logger log = LoggerFactory.getLogger(PlaceOfferProtocol.class);
|
private static final Logger log = LoggerFactory.getLogger(PlaceOfferProtocol.class);
|
||||||
|
|
||||||
private final PlaceOfferModel model;
|
private final PlaceOfferModel model;
|
||||||
private TransactionResultHandler resultHandler;
|
private final TransactionResultHandler resultHandler;
|
||||||
private ErrorMessageHandler errorMessageHandler;
|
private final ErrorMessageHandler errorMessageHandler;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor
|
// Constructor
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -56,9 +58,8 @@ public class BroadcastCreateOfferFeeTx extends Task<PlaceOfferModel> {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Transaction transaction) {
|
public void onSuccess(Transaction transaction) {
|
||||||
log.info("Broadcast of offer fee payment succeeded: transaction = " + transaction.toString());
|
log.info("Broadcast of offer fee payment succeeded: transaction = " + transaction.toString());
|
||||||
if (transaction != null) {
|
|
||||||
|
|
||||||
if (model.getTransaction().getHashAsString() == transaction.getHashAsString()) {
|
if (model.getTransaction().getHashAsString().equals(transaction.getHashAsString())) {
|
||||||
// No tx malleability happened after broadcast (still not in blockchain)
|
// No tx malleability happened after broadcast (still not in blockchain)
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
@ -87,13 +88,9 @@ public class BroadcastCreateOfferFeeTx extends Task<PlaceOfferModel> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
failed("Fault reason: Transaction = null.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(@NotNull Throwable t) {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,29 +39,29 @@ public class OfferSharedModel extends SharedModel {
|
||||||
protected static final Logger log = LoggerFactory.getLogger(OfferSharedModel.class);
|
protected static final Logger log = LoggerFactory.getLogger(OfferSharedModel.class);
|
||||||
|
|
||||||
// provided
|
// provided
|
||||||
protected final Offer offer;
|
private final Offer offer;
|
||||||
protected final TradeMessageService tradeMessageService;
|
private final TradeMessageService tradeMessageService;
|
||||||
protected final WalletService walletService;
|
private final WalletService walletService;
|
||||||
protected final BlockChainService blockChainService;
|
private final BlockChainService blockChainService;
|
||||||
protected final SignatureService signatureService;
|
private final SignatureService signatureService;
|
||||||
|
|
||||||
|
|
||||||
// derived
|
// derived
|
||||||
protected final String id;
|
private final String id;
|
||||||
protected final BankAccount bankAccount;
|
private final BankAccount bankAccount;
|
||||||
protected final String accountId;
|
private final String accountId;
|
||||||
protected final PublicKey networkPubKey;
|
private final PublicKey networkPubKey;
|
||||||
protected final byte[] registrationPubKey;
|
private final byte[] registrationPubKey;
|
||||||
protected final DeterministicKey registrationKeyPair;
|
private final DeterministicKey registrationKeyPair;
|
||||||
protected final byte[] arbitratorPubKey;
|
private final byte[] arbitratorPubKey;
|
||||||
protected final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final TradeService tradeService;
|
private final TradeService tradeService;
|
||||||
|
|
||||||
// data written/read by tasks
|
// data written/read by tasks
|
||||||
protected TradeMessage tradeMessage;
|
private TradeMessage tradeMessage;
|
||||||
|
|
||||||
|
|
||||||
public OfferSharedModel(Offer offer,
|
protected OfferSharedModel(Offer offer,
|
||||||
TradeMessageService tradeMessageService,
|
TradeMessageService tradeMessageService,
|
||||||
WalletService walletService,
|
WalletService walletService,
|
||||||
BlockChainService blockChainService,
|
BlockChainService blockChainService,
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class BuyerAsOffererModel extends OfferSharedModel {
|
||||||
this.offererOutputs = offererOutputs;
|
this.offererOutputs = offererOutputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public OpenOffer getOpenOffer() {
|
public OpenOffer getOpenOffer() {
|
||||||
return openOffer;
|
return openOffer;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +120,6 @@ public class BuyerAsOffererModel extends OfferSharedModel {
|
||||||
return taker;
|
return taker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getTakeOfferFeeTxId() {
|
public String getTakeOfferFeeTxId() {
|
||||||
return takeOfferFeeTxId;
|
return takeOfferFeeTxId;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +200,6 @@ public class BuyerAsOffererModel extends OfferSharedModel {
|
||||||
this.taker = taker;
|
this.taker = taker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setTakerDepositTx(Transaction takerDepositTx) {
|
public void setTakerDepositTx(Transaction takerDepositTx) {
|
||||||
this.takerDepositTx = takerDepositTx;
|
this.takerDepositTx = takerDepositTx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class BuyerAsOffererProtocol {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(BuyerAsOffererProtocol.class);
|
private static final Logger log = LoggerFactory.getLogger(BuyerAsOffererProtocol.class);
|
||||||
|
|
||||||
private BuyerAsOffererModel model;
|
private final BuyerAsOffererModel model;
|
||||||
private final MessageHandler messageHandler;
|
private final MessageHandler messageHandler;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -24,7 +24,7 @@ import io.bitsquare.util.taskrunner.TaskRunner;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class BuyerAsOffererTaskRunner<T extends BuyerAsOffererModel> extends TaskRunner<BuyerAsOffererModel> {
|
class BuyerAsOffererTaskRunner<T extends BuyerAsOffererModel> extends TaskRunner<BuyerAsOffererModel> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(BuyerAsOffererTaskRunner.class);
|
private static final Logger log = LoggerFactory.getLogger(BuyerAsOffererTaskRunner.class);
|
||||||
|
|
||||||
public BuyerAsOffererTaskRunner(T sharedModel, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
public BuyerAsOffererTaskRunner(T sharedModel, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.io.Serializable;
|
||||||
|
|
||||||
public class BankTransferStartedMessage implements Serializable, TradeMessage {
|
public class BankTransferStartedMessage implements Serializable, TradeMessage {
|
||||||
private static final long serialVersionUID = -3479634129543632523L;
|
private static final long serialVersionUID = -3479634129543632523L;
|
||||||
private final String tradeId;
|
|
||||||
|
|
||||||
|
private final String tradeId;
|
||||||
private final Transaction depositTx;
|
private final Transaction depositTx;
|
||||||
private final byte[] offererSignature;
|
private final byte[] offererSignature;
|
||||||
private final Coin offererPayoutAmount;
|
private final Coin offererPayoutAmount;
|
||||||
|
|
|
@ -24,10 +24,9 @@ import org.bitcoinj.core.Transaction;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
public class DepositTxPublishedMessage implements Serializable, TradeMessage {
|
public class DepositTxPublishedMessage implements Serializable, TradeMessage {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1532231540167406581L;
|
private static final long serialVersionUID = -1532231540167406581L;
|
||||||
private final String tradeId;
|
|
||||||
|
|
||||||
|
private final String tradeId;
|
||||||
private final Transaction depositTx;
|
private final Transaction depositTx;
|
||||||
|
|
||||||
public DepositTxPublishedMessage(String tradeId, Transaction depositTx) {
|
public DepositTxPublishedMessage(String tradeId, Transaction depositTx) {
|
||||||
|
|
|
@ -21,14 +21,13 @@ import io.bitsquare.trade.protocol.trade.TradeMessage;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public class RespondToTakeOfferRequestMessage implements Serializable, TradeMessage {
|
public class RespondToTakeOfferRequestMessage implements Serializable, TradeMessage {
|
||||||
private static final long serialVersionUID = 6177387534087739018L;
|
private static final long serialVersionUID = 6177387534087739018L;
|
||||||
|
|
||||||
private final String tradeId;
|
private final String tradeId;
|
||||||
private final boolean offerIsAvailable;
|
private final boolean offerIsAvailable;
|
||||||
|
|
||||||
public RespondToTakeOfferRequestMessage(@NotNull String tradeId, boolean offerIsAvailable) {
|
public RespondToTakeOfferRequestMessage(String tradeId, boolean offerIsAvailable) {
|
||||||
this.tradeId = tradeId;
|
this.tradeId = tradeId;
|
||||||
this.offerIsAvailable = offerIsAvailable;
|
this.offerIsAvailable = offerIsAvailable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class GetOffererDepositTxInputs extends Task<BuyerAsOffererModel> {
|
||||||
protected void doRun() {
|
protected void doRun() {
|
||||||
try {
|
try {
|
||||||
Coin offererInputAmount = model.getTrade().getSecurityDeposit().add(FeePolicy.TX_FEE);
|
Coin offererInputAmount = model.getTrade().getSecurityDeposit().add(FeePolicy.TX_FEE);
|
||||||
AddressEntry addressInfo = model.getWalletService().getAddressEntry(model.getId());
|
AddressEntry addressInfo = model.getAddressEntry();
|
||||||
TradeService.TransactionDataResult result = model.getTradeService().offererCreatesDepositTxInputs(offererInputAmount, addressInfo);
|
TradeService.TransactionDataResult result = model.getTradeService().offererCreatesDepositTxInputs(offererInputAmount, addressInfo);
|
||||||
|
|
||||||
model.setOffererConnectedOutputsForAllInputs(result.getConnectedOutputsForAllInputs());
|
model.setOffererConnectedOutputsForAllInputs(result.getConnectedOutputsForAllInputs());
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class RequestDepositPayment extends Task<BuyerAsOffererModel> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleFault() {
|
public void handleFault() {
|
||||||
failed("RequestTakerDepositPaymentMessage did not arrive at peer");
|
failed();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class SignPayoutTx extends Task<BuyerAsOffererModel> {
|
||||||
Trade trade = model.getTrade();
|
Trade trade = model.getTrade();
|
||||||
Coin securityDeposit = trade.getSecurityDeposit();
|
Coin securityDeposit = trade.getSecurityDeposit();
|
||||||
Coin offererPayoutAmount = trade.getTradeAmount().add(securityDeposit);
|
Coin offererPayoutAmount = trade.getTradeAmount().add(securityDeposit);
|
||||||
Coin takerPayoutAmount = securityDeposit;
|
@SuppressWarnings("UnnecessaryLocalVariable") Coin takerPayoutAmount = securityDeposit;
|
||||||
|
|
||||||
TradeService.TransactionDataResult result = model.getTradeService().offererCreatesAndSignsPayoutTx(
|
TradeService.TransactionDataResult result = model.getTradeService().offererCreatesAndSignsPayoutTx(
|
||||||
trade.getDepositTx(),
|
trade.getDepositTx(),
|
||||||
|
|
|
@ -49,13 +49,10 @@ public class SellerAsTakerModel extends OfferSharedModel {
|
||||||
|
|
||||||
// written/read by task
|
// written/read by task
|
||||||
private Peer offerer;
|
private Peer offerer;
|
||||||
private Transaction preparedDepositTx;
|
|
||||||
private Transaction depositTx;
|
private Transaction depositTx;
|
||||||
private Transaction signedTakerDepositTx;
|
|
||||||
private Transaction payoutTx;
|
private Transaction payoutTx;
|
||||||
private Coin takerPayoutAmount;
|
private Coin takerPayoutAmount;
|
||||||
private byte[] offererPubKey;
|
private byte[] offererPubKey;
|
||||||
private long offererTxOutIndex;
|
|
||||||
private Coin offererPayoutAmount;
|
private Coin offererPayoutAmount;
|
||||||
private String offererPayoutAddress;
|
private String offererPayoutAddress;
|
||||||
private List<TransactionOutput> offererConnectedOutputsForAllInputs;
|
private List<TransactionOutput> offererConnectedOutputsForAllInputs;
|
||||||
|
@ -134,23 +131,6 @@ public class SellerAsTakerModel extends OfferSharedModel {
|
||||||
return offererPubKey;
|
return offererPubKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Transaction getPreparedDepositTx() {
|
|
||||||
return preparedDepositTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPreparedDepositTx(Transaction preparedDepositTx) {
|
|
||||||
this.preparedDepositTx = preparedDepositTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOffererTxOutIndex() {
|
|
||||||
return offererTxOutIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOffererTxOutIndex(long offererTxOutIndex) {
|
|
||||||
this.offererTxOutIndex = offererTxOutIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Transaction getDepositTx() {
|
public Transaction getDepositTx() {
|
||||||
return depositTx;
|
return depositTx;
|
||||||
}
|
}
|
||||||
|
@ -183,15 +163,6 @@ public class SellerAsTakerModel extends OfferSharedModel {
|
||||||
this.offererPayoutAddress = offererPayoutAddress;
|
this.offererPayoutAddress = offererPayoutAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Transaction getSignedTakerDepositTx() {
|
|
||||||
return signedTakerDepositTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSignedTakerDepositTx(Transaction signedTakerDepositTx) {
|
|
||||||
this.signedTakerDepositTx = signedTakerDepositTx;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setTakerConnectedOutputsForAllInputs(List<TransactionOutput> takerConnectedOutputsForAllInputs) {
|
public void setTakerConnectedOutputsForAllInputs(List<TransactionOutput> takerConnectedOutputsForAllInputs) {
|
||||||
this.takerConnectedOutputsForAllInputs = takerConnectedOutputsForAllInputs;
|
this.takerConnectedOutputsForAllInputs = takerConnectedOutputsForAllInputs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class SellerAsTakerProtocol {
|
||||||
// Massage dispatcher
|
// Massage dispatcher
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void handleMessage(Message message, Peer sender) {
|
private void handleMessage(Message message, @SuppressWarnings("UnusedParameters") Peer sender) {
|
||||||
log.trace("handleNewMessage: message = " + message.getClass().getSimpleName());
|
log.trace("handleNewMessage: message = " + message.getClass().getSimpleName());
|
||||||
if (message instanceof TradeMessage) {
|
if (message instanceof TradeMessage) {
|
||||||
TradeMessage tradeMessage = (TradeMessage) message;
|
TradeMessage tradeMessage = (TradeMessage) message;
|
||||||
|
|
|
@ -24,7 +24,7 @@ import io.bitsquare.util.taskrunner.TaskRunner;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class SellerAsTakerTaskRunner<T extends SellerAsTakerModel> extends TaskRunner<SellerAsTakerModel> {
|
class SellerAsTakerTaskRunner<T extends SellerAsTakerModel> extends TaskRunner<SellerAsTakerModel> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(SellerAsTakerTaskRunner.class);
|
private static final Logger log = LoggerFactory.getLogger(SellerAsTakerTaskRunner.class);
|
||||||
|
|
||||||
public SellerAsTakerTaskRunner(T sharedModel, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
public SellerAsTakerTaskRunner(T sharedModel, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
public class PayoutTxPublishedMessage implements Serializable, TradeMessage {
|
public class PayoutTxPublishedMessage implements Serializable, TradeMessage {
|
||||||
private static final long serialVersionUID = 1288653559218403873L;
|
private static final long serialVersionUID = 1288653559218403873L;
|
||||||
|
|
||||||
private final String tradeId;
|
private final String tradeId;
|
||||||
private final Transaction payoutTx;
|
private final Transaction payoutTx;
|
||||||
|
|
||||||
|
|
|
@ -31,16 +31,17 @@ import java.util.List;
|
||||||
|
|
||||||
public class RequestOffererPublishDepositTxMessage implements Serializable, TradeMessage {
|
public class RequestOffererPublishDepositTxMessage implements Serializable, TradeMessage {
|
||||||
private static final long serialVersionUID = 2179683654379803071L;
|
private static final long serialVersionUID = 2179683654379803071L;
|
||||||
|
|
||||||
private final String tradeId;
|
private final String tradeId;
|
||||||
private final BankAccount bankAccount;
|
private final BankAccount bankAccount;
|
||||||
private final String accountID;
|
private final String accountID;
|
||||||
private final PublicKey takerMessagePublicKey;
|
private final PublicKey takerMessagePublicKey;
|
||||||
private final String contractAsJson;
|
private final String contractAsJson;
|
||||||
private final String takerContractSignature;
|
private final String takerContractSignature;
|
||||||
private String takerPayoutAddress;
|
private final String takerPayoutAddress;
|
||||||
private Transaction takersDepositTx;
|
private final Transaction takersDepositTx;
|
||||||
private List<TransactionOutput> takerConnectedOutputsForAllInputs;
|
private final List<TransactionOutput> takerConnectedOutputsForAllInputs;
|
||||||
private List<TransactionOutput> takerOutputs;
|
private final List<TransactionOutput> takerOutputs;
|
||||||
|
|
||||||
public RequestOffererPublishDepositTxMessage(String tradeId,
|
public RequestOffererPublishDepositTxMessage(String tradeId,
|
||||||
BankAccount bankAccount,
|
BankAccount bankAccount,
|
||||||
|
|
|
@ -43,12 +43,14 @@ public class GetPeerAddress extends Task<SellerAsTakerModel> {
|
||||||
log.trace("Found peer: " + peer.toString());
|
log.trace("Found peer: " + peer.toString());
|
||||||
|
|
||||||
model.setOfferer(peer);
|
model.setOfferer(peer);
|
||||||
|
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed() {
|
public void onFailed() {
|
||||||
model.getOffer().setState(Offer.State.OFFERER_OFFLINE);
|
model.getOffer().setState(Offer.State.OFFERER_OFFLINE);
|
||||||
|
|
||||||
failed();
|
failed();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,6 @@ import io.bitsquare.trade.protocol.trade.taker.SellerAsTakerModel;
|
||||||
import io.bitsquare.util.taskrunner.Task;
|
import io.bitsquare.util.taskrunner.Task;
|
||||||
import io.bitsquare.util.taskrunner.TaskRunner;
|
import io.bitsquare.util.taskrunner.TaskRunner;
|
||||||
|
|
||||||
import org.bitcoinj.core.InsufficientMoneyException;
|
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
|
@ -57,7 +56,7 @@ public class PayTakeOfferFee extends Task<SellerAsTakerModel> {
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (InsufficientMoneyException e) {
|
} catch (Exception e) {
|
||||||
appendToErrorMessage(e.getMessage());
|
appendToErrorMessage(e.getMessage());
|
||||||
failed(e);
|
failed(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class SendTakeOfferFeePayedMessage extends Task<SellerAsTakerModel> {
|
||||||
super(taskHandler, model);
|
super(taskHandler, model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int retryCounter = 0;
|
private int retryCounter = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doRun() {
|
protected void doRun() {
|
||||||
|
|
|
@ -23,7 +23,6 @@ import io.bitsquare.util.taskrunner.Task;
|
||||||
import io.bitsquare.util.taskrunner.TaskRunner;
|
import io.bitsquare.util.taskrunner.TaskRunner;
|
||||||
|
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
import org.bitcoinj.core.Utils;
|
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
|
|
||||||
|
@ -52,9 +51,6 @@ public class SignAndPublishPayoutTx extends Task<SellerAsTakerModel> {
|
||||||
new FutureCallback<Transaction>() {
|
new FutureCallback<Transaction>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Transaction transaction) {
|
public void onSuccess(Transaction transaction) {
|
||||||
log.debug("published payoutTx " + transaction);
|
|
||||||
String payoutTxAsHex = Utils.HEX.encode(transaction.bitcoinSerialize());
|
|
||||||
|
|
||||||
model.setPayoutTx(transaction);
|
model.setPayoutTx(transaction);
|
||||||
model.getTrade().setState(Trade.State.PAYOUT_PUBLISHED);
|
model.getTrade().setState(Trade.State.PAYOUT_PUBLISHED);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ import io.bitsquare.trade.TradeMessageModule;
|
||||||
import io.bitsquare.trade.TradeMessageService;
|
import io.bitsquare.trade.TradeMessageService;
|
||||||
import io.bitsquare.user.User;
|
import io.bitsquare.user.User;
|
||||||
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
|
|
||||||
|
@ -42,11 +41,6 @@ public class TomP2PTradeMessageModule extends TradeMessageModule {
|
||||||
protected void doConfigure() {
|
protected void doConfigure() {
|
||||||
bind(TradeMessageService.class).toProvider(TomP2PTradeMessageServiceProvider.class).in(Singleton.class);
|
bind(TradeMessageService.class).toProvider(TomP2PTradeMessageServiceProvider.class).in(Singleton.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doClose(Injector injector) {
|
|
||||||
super.doClose(injector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TomP2PTradeMessageServiceProvider implements Provider<TradeMessageService> {
|
class TomP2PTradeMessageServiceProvider implements Provider<TradeMessageService> {
|
||||||
|
|
|
@ -56,7 +56,6 @@ public class TomP2PTradeMessageService implements TradeMessageService {
|
||||||
private static final Logger log = LoggerFactory.getLogger(TomP2PTradeMessageService.class);
|
private static final Logger log = LoggerFactory.getLogger(TomP2PTradeMessageService.class);
|
||||||
|
|
||||||
private final TomP2PNode tomP2PNode;
|
private final TomP2PNode tomP2PNode;
|
||||||
private final User user;
|
|
||||||
private final List<MessageHandler> messageHandlers = new ArrayList<>();
|
private final List<MessageHandler> messageHandlers = new ArrayList<>();
|
||||||
private Executor executor;
|
private Executor executor;
|
||||||
|
|
||||||
|
@ -66,11 +65,9 @@ public class TomP2PTradeMessageService implements TradeMessageService {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public TomP2PTradeMessageService(User user, TomP2PNode tomP2PNode) {
|
public TomP2PTradeMessageService(User user, TomP2PNode tomP2PNode) {
|
||||||
this.user = user;
|
|
||||||
this.tomP2PNode = tomP2PNode;
|
this.tomP2PNode = tomP2PNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setExecutor(Executor executor) {
|
public void setExecutor(Executor executor) {
|
||||||
this.executor = executor;
|
this.executor = executor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue