Skip to content

Commit

Permalink
wallet: shuffle transaction inputs if we aren't using BIP69
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Feb 9, 2025
1 parent 1cf1c58 commit 0711e67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wallet/spend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ bool CWallet::CreateTransactionInternal(
txNew.vin.push_back(CTxIn(coin.outpoint, CScript(), nSequence));
}
if (sort_bip69) { std::sort(txNew.vin.begin(), txNew.vin.end(), CompareInputBIP69()); }
else { Shuffle(txNew.vin.begin(), txNew.vin.end(), FastRandomContext()); }

if (sign && !SignTransaction(txNew)) {
error = _("Signing transaction failed");
Expand Down

0 comments on commit 0711e67

Please sign in to comment.