Skip to content

Commit d140732

Browse files
UdjinM6PastaPastaPasta
authored andcommitted
trivial refactor
1 parent 8e22dad commit d140732

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/coinjoin/client.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,10 +1191,8 @@ bool CCoinJoinClientSession::JoinExistingQueue(CAmount nBalanceNeedsAnonymized,
11911191
WalletCJLogPrint(m_wallet, "CCoinJoinClientSession::JoinExistingQueue -- trying queue: %s\n", dsq.ToString());
11921192

11931193
// For promotion/demotion, we need a queue with the target denomination
1194-
if ((fPromotion || fDemotion) && nTargetDenom != 0) {
1195-
if (dsq.nDenom != nTargetDenom) {
1196-
continue; // Skip queues with wrong denomination
1197-
}
1194+
if ((fPromotion || fDemotion) && nTargetDenom != 0 && dsq.nDenom != nTargetDenom) {
1195+
continue; // Skip queues with wrong denomination
11981196
}
11991197

12001198
std::vector<CTxDSIn> vecTxDSInTmp;

src/coinjoin/coinjoin.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ bool CCoinJoinBroadcastTx::IsValidStructure(const CBlockIndex* pindex) const
101101

102102
// Pre-V24: require balanced input/output counts (1:1 mixing only)
103103
// Post-V24: allow unbalanced counts (promotion/demotion)
104-
if (!fV24Active) {
105-
if (tx->vin.size() != tx->vout.size()) {
106-
return false;
107-
}
104+
if (!fV24Active && tx->vin.size() != tx->vout.size()) {
105+
return false;
108106
}
109107

110108
if (tx->vin.size() < size_t(CoinJoin::GetMinPoolParticipants())) {

0 commit comments

Comments
 (0)