@morcos @laanwj @cozz bitcoin-qt should not ignore the param and use DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN all the time.
This code behaves exactly the same as the code which got rejected in #6887. (C.f. in-source comment for explanation)
Slightly NACK.
CreateTransaction() at L277 (https://github.com/bitcoin/bitcoin/blob/master/src/qt/walletmodel.cpp#L277) will already reduce the fee to maxTxFee (through GetMinimumFee(nBytes, nTxConfirmTarget, mempool)).
Check: https://github.com/bitcoin/bitcoin/blob/master/src/wallet/wallet.cpp#L2144
IMO it’s impossible that the changed if triggers (if (nFeeRequired > maxTxFee))).
I think we should remove the if.
The only concern I see – is – if a user sets an absurde fee over the QT send coins UI, lets assume 10.0 BTC per kb (which will be accepted in the input filed), the fee will automatically – without warning or informing – reduced to maxTxFee. A warning or information would be appropriate in this case.
I think we should remove the if. @laanwj did not like that.
After reading the ifs comment, I see the purpose of this check. It’s a “belt-and-suspenders check”. So, it shouldn’t hurt and might protect from insane fees if we once change the wallet layer.
Changed my mind: Tested ACK.