mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
add more logs
This commit is contained in:
parent
625749534c
commit
e6463f5f86
1 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.shared;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
import com.google.common.util.concurrent.ListenableFuture;
|
import com.google.common.util.concurrent.ListenableFuture;
|
||||||
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
import io.bitsquare.trade.Trade;
|
import io.bitsquare.trade.Trade;
|
||||||
|
@ -69,18 +70,23 @@ public class BroadcastAfterLockTime extends TradeTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void broadcastTx() {
|
private void broadcastTx() {
|
||||||
|
Log.traceCall();
|
||||||
Transaction payoutTx = trade.getPayoutTx();
|
Transaction payoutTx = trade.getPayoutTx();
|
||||||
checkNotNull(payoutTx, "payoutTx must not be null at BroadcastAfterLockTime.broadcastTx");
|
checkNotNull(payoutTx, "payoutTx must not be null at BroadcastAfterLockTime.broadcastTx");
|
||||||
|
|
||||||
Transaction payoutTxFromWallet = processModel.getWalletService().getWallet().getTransaction(payoutTx.getHash());
|
Transaction payoutTxFromWallet = processModel.getWalletService().getWallet().getTransaction(payoutTx.getHash());
|
||||||
|
log.debug("payoutTxFromWallet:" + payoutTxFromWallet);
|
||||||
if (payoutTxFromWallet != null)
|
if (payoutTxFromWallet != null)
|
||||||
payoutTx = payoutTxFromWallet;
|
payoutTx = payoutTxFromWallet;
|
||||||
|
|
||||||
TransactionConfidence.ConfidenceType confidenceType = payoutTx.getConfidence().getConfidenceType();
|
TransactionConfidence.ConfidenceType confidenceType = payoutTx.getConfidence().getConfidenceType();
|
||||||
|
log.debug("payoutTx confidenceType:" + confidenceType);
|
||||||
if (confidenceType.equals(TransactionConfidence.ConfidenceType.BUILDING)) {
|
if (confidenceType.equals(TransactionConfidence.ConfidenceType.BUILDING)) {
|
||||||
|
log.debug("payoutTx already building:" + payoutTx);
|
||||||
trade.setState(Trade.State.PAYOUT_BROAD_CASTED);
|
trade.setState(Trade.State.PAYOUT_BROAD_CASTED);
|
||||||
complete();
|
complete();
|
||||||
} else {
|
} else {
|
||||||
|
log.debug("do broadcast tx " + payoutTx);
|
||||||
processModel.getTradeWalletService().broadcastTx(payoutTx, new FutureCallback<Transaction>() {
|
processModel.getTradeWalletService().broadcastTx(payoutTx, new FutureCallback<Transaction>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Transaction transaction) {
|
public void onSuccess(Transaction transaction) {
|
||||||
|
@ -91,6 +97,7 @@ public class BroadcastAfterLockTime extends TradeTask {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NotNull Throwable t) {
|
public void onFailure(@NotNull Throwable t) {
|
||||||
|
log.error("BroadcastTx failed. Error:" + t.getMessage());
|
||||||
failed(t);
|
failed(t);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue