Skip to content

Commit

Permalink
fix(coinjoin): do not label a collateral tx as SELF
Browse files Browse the repository at this point in the history
* The TX will be ignored by Peer.processTransaction.
  • Loading branch information
HashEngineering committed Aug 5, 2023
1 parent b254f3e commit 12f4a20
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,12 @@ private boolean createCollateralTransaction(Transaction txCollateral, StringBuil
}

try {
// don't set the source to TransactionConfidence.Source.SELF on these collateral transactions
// otherwise when the masternodes do submit these transactions to the network, they will be
// ignored by DashJ and when they are received
SendRequest req = SendRequest.forTx(txCollateral);
req.aesKey = context.coinJoinManager.requestKeyParameter(mixingWallet);
mixingWallet.signTransaction(req);
TransactionConfidence confidence = txCollateral.getConfidence();
if (confidence != null) {
confidence.setSource(TransactionConfidence.Source.SELF);
confidence.setConfidenceType(TransactionConfidence.ConfidenceType.UNKNOWN);
}
} catch (ScriptException x) {
strReason.append("Unable to sign collateral transaction!");
return false;
Expand Down

0 comments on commit 12f4a20

Please sign in to comment.