File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,11 @@ void SendCoinsDialog::on_sendButton_clicked()
254254 return ;
255255 }
256256
257+ // apply BIP69
258+ if (bBIP69Enabled) {
259+ std::sort (recipients.begin (), recipients.end (), CompareSendCoinsRecipientBIP69 ());
260+ }
261+
257262 QString strFunds = tr (" using" ) + " <b>" + tr (" anonymous funds" ) + " </b>" ;
258263 QString strFee = " " ;
259264 recipients[0 ].inputType = ONLY_DENOMINATED;
Original file line number Diff line number Diff line change @@ -101,6 +101,15 @@ class SendCoinsRecipient
101101 }
102102};
103103
104+ // same as CompareOutputBIP69 in primitives/transaction.h
105+ struct CompareSendCoinsRecipientBIP69
106+ {
107+ inline bool operator ()(const SendCoinsRecipient& a, const SendCoinsRecipient& b) const
108+ {
109+ return a.amount < b.amount || (a.amount == b.amount && a.address < b.address );
110+ }
111+ };
112+
104113/* * Interface to Bitcoin wallet from Qt view code. */
105114class WalletModel : public QObject
106115{
You can’t perform that action at this time.
0 commit comments