mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-29 09:48:46 -04:00
Cleanup listeners
This commit is contained in:
parent
0f87eb99cc
commit
b81e263c24
13 changed files with 467 additions and 439 deletions
|
@ -818,6 +818,7 @@ public class TradeWalletService {
|
|||
|
||||
// We need to recreate the transaction otherwise we get a null pointer...
|
||||
Transaction result = new Transaction(params, transaction.bitcoinSerialize());
|
||||
result.getConfidence(Context.get()).setSource(TransactionConfidence.Source.SELF);
|
||||
log.trace("transaction " + result.toString());
|
||||
|
||||
if (wallet != null)
|
||||
|
@ -835,6 +836,7 @@ public class TradeWalletService {
|
|||
|
||||
// We need to recreate the tx otherwise we get a null pointer...
|
||||
Transaction transaction = new Transaction(params, serializedTransaction);
|
||||
transaction.getConfidence(Context.get()).setSource(TransactionConfidence.Source.NETWORK);
|
||||
log.trace("transaction " + transaction.toString());
|
||||
|
||||
if (wallet != null)
|
||||
|
@ -941,9 +943,9 @@ public class TradeWalletService {
|
|||
transaction.addInput(p2SHMultiSigOutput);
|
||||
transaction.addOutput(buyerPayoutAmount, new Address(params, buyerAddressString));
|
||||
transaction.addOutput(sellerPayoutAmount, new Address(params, sellerAddressString));
|
||||
transaction.setLockTime(lockTime);
|
||||
// When using lockTime we need to set sequenceNumber to 0
|
||||
transaction.getInputs().stream().forEach(i -> i.setSequenceNumber(0));
|
||||
transaction.setLockTime(lockTime);
|
||||
return transaction;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class CreateAndSignDepositTxAsBuyer extends TradeTask {
|
|||
Coin buyerInputAmount = FeePolicy.SECURITY_DEPOSIT.add(FeePolicy.TX_FEE);
|
||||
Coin msOutputAmount = buyerInputAmount.add(FeePolicy.SECURITY_DEPOSIT).add(trade.getTradeAmount());
|
||||
|
||||
log.debug("getContractAsJson");
|
||||
log.debug("----------");
|
||||
log.debug(trade.getContractAsJson());
|
||||
log.debug("----------");
|
||||
log.info("\n\n------------------------------------------------------------\n"
|
||||
+ "Contract as json\n"
|
||||
+ trade.getContractAsJson()
|
||||
+ "\n------------------------------------------------------------\n");
|
||||
|
||||
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
||||
trade.setContractHash(contractHash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue