Merge pull request #4040 from sqrrm/log-delayedtx-at-trade-init

Log delayed payout tx bytes as soon as it's signed during trade init
This commit is contained in:
Christoph Atteneder 2020-03-10 16:40:52 +01:00 committed by GitHub
commit 6c8110aef8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -26,6 +26,7 @@ import bisq.core.trade.protocol.tasks.TradeTask;
import bisq.core.util.Validator; import bisq.core.util.Validator;
import bisq.common.taskrunner.TaskRunner; import bisq.common.taskrunner.TaskRunner;
import bisq.common.util.Utilities;
import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Transaction;
@ -61,6 +62,7 @@ public class BuyerProcessDepositTxAndDelayedPayoutTxMessage extends TradeTask {
byte[] delayedPayoutTxBytes = message.getDelayedPayoutTx(); byte[] delayedPayoutTxBytes = message.getDelayedPayoutTx();
trade.applyDelayedPayoutTxBytes(delayedPayoutTxBytes); trade.applyDelayedPayoutTxBytes(delayedPayoutTxBytes);
BtcWalletService.printTx("delayedPayoutTx received from peer", trade.getDelayedPayoutTx()); BtcWalletService.printTx("delayedPayoutTx received from peer", trade.getDelayedPayoutTx());
log.info("DelayedPayoutTxBytes = {}", Utilities.bytesAsHexString(trade.getDelayedPayoutTxBytes()));
// update to the latest peer address of our peer if the message is correct // update to the latest peer address of our peer if the message is correct
trade.setTradingPeerNodeAddress(processModel.getTempTradingPeerNodeAddress()); trade.setTradingPeerNodeAddress(processModel.getTempTradingPeerNodeAddress());

View file

@ -23,6 +23,7 @@ import bisq.core.trade.Trade;
import bisq.core.trade.protocol.tasks.TradeTask; import bisq.core.trade.protocol.tasks.TradeTask;
import bisq.common.taskrunner.TaskRunner; import bisq.common.taskrunner.TaskRunner;
import bisq.common.util.Utilities;
import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Transaction;
@ -65,6 +66,7 @@ public class SellerFinalizesDelayedPayoutTx extends TradeTask {
sellerSignature); sellerSignature);
trade.applyDelayedPayoutTx(signedDelayedPayoutTx); trade.applyDelayedPayoutTx(signedDelayedPayoutTx);
log.info("DelayedPayoutTxBytes = {}", Utilities.bytesAsHexString(trade.getDelayedPayoutTxBytes()));
complete(); complete();
} catch (Throwable t) { } catch (Throwable t) {