Skip to content

Commit d5cc88f

Browse files
authored
Should mark tx as a PS one regardless of change calculations in CreateTransaction (#3193)
1 parent e9235b9 commit d5cc88f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3652,6 +3652,10 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
36523652

36533653
wtxNew.fTimeReceivedIsTxTime = true;
36543654
wtxNew.BindWallet(this);
3655+
if (coin_control.nCoinType == CoinType::ONLY_DENOMINATED) {
3656+
wtxNew.mapValue["DS"] = "1";
3657+
}
3658+
36553659
CMutableTransaction txNew;
36563660

36573661
// Discourage fee sniping.
@@ -3802,7 +3806,6 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
38023806
if (coin_control.nCoinType == CoinType::ONLY_DENOMINATED) {
38033807
nChangePosInOut = -1;
38043808
nFeeRet += nChange;
3805-
wtxNew.mapValue["DS"] = "1";
38063809
} else {
38073810
// Fill a vout to ourself
38083811
newTxOut = CTxOut(nChange, scriptChange);

0 commit comments

Comments
 (0)