[qt] Use maxTxFee instead of 10000000 #6951

Merged
merged 1 commit into from Nov 18, 2015

Conversation

Projects
None yet
4 participants
@MarcoFalke
Member

MarcoFalke commented Nov 5, 2015

@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)

@laanwj laanwj added GUI Wallet labels Nov 9, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 9, 2015

Member

utACK

Member

laanwj commented Nov 9, 2015

utACK

@fanquake

This comment has been minimized.

Show comment
Hide comment
@fanquake

fanquake Nov 11, 2015

Member

utACK

Member

fanquake commented Nov 11, 2015

utACK

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 16, 2015

Member

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.

Member

jonasschnelli commented Nov 16, 2015

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.

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Nov 16, 2015

Member

I think we should remove the if.

@laanwj did not like that.

Member

MarcoFalke commented Nov 16, 2015

I think we should remove the if.

@laanwj did not like that.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 16, 2015

Member

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.

Member

jonasschnelli commented Nov 16, 2015

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.

@jonasschnelli jonasschnelli merged commit 513686d into bitcoin:master Nov 18, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jonasschnelli added a commit that referenced this pull request Nov 18, 2015

Merge pull request #6951
513686d [qt] Use maxTxFee instead of 10000000 (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:MarcoFalke-2015-qtMaxFee branch Nov 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment