-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Wallet: Catches situations where capping on maxtxfee drops the fee too low #16192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
ACK. Don't forget to update the help text for the option and add some release notes. A test would be nice. |
|
@MarcoFalke the help text already contains How do I add release notes? |
|
To add release notes run |
|
Would like to have a test for this too, otherwise ACK. |
|
I think a test must be added. |
|
Concept ACK - please add test |
|
While writing the test I realized that it makes sense to check both the |
|
58ac729 is unnecessary as the condition will short-circuit. I.e.
|
|
@Empact you're right. Wouldn't it still run the comparison twice in situations where |
Would expect it to be optimized out by essentially any compiler. |
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. Maybe a functional test could also be added?
|
OK, I can revert it if that's desirable. Any pointers as to why EDIT: Never mind, it succeeded on the next check-in - must have been some transient issue |
|
Please squash your commits when you've finished addressing review comments. |
4657c21 to
edc4366
Compare
|
@fanquake Done! |
Could use: (line numbers are off because I saw this when running the new test case against the current master) |
e00df12 to
fc9d18b
Compare
|
Fixed that in the test. Did however not get that warning myself while compiling (using |
|
FTR I'm running with: |
|
Added a functional test as well. |
|
I think this is ready for a final review |
|
There is some trailing white-space in some files, which is why travis failed. |
|
See also #16257 which removes the fee cap entirely and instead throws if |
This is a possible fix for #10122
If the fee is capped on
-maxtxfee, it will check if the fee is still above-mintxfeeand-paytxfeefor the given transaction. However, it seems this is a very edge case. In order to run into this, I had to pass-maxtxfee=0.01 -mintxfee=0.005and then send a transaction that was about 89kB.It seems that under the defaults no one would run into this; but maybe there's more scenario's under which this would be a problem.