Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[amount] Add support for negative fee rates #7796
Negative fee rates imply that you pay a smaller, more negative fee the larger the transaction? What do negative fees even mean, steal from the miner? Or is this so that anti-transactions of negative size pay a positive fee?
I'd say this is an edge case better to get rid of (e.g. assert or throw an error).
I think it's probably better to fix support for negative fee rates on 64-bit platforms, because (a) fixing the
But to be fair, I'm surprised that no one has complained about this before, because as far as I can tell, up until 0.12, if you used prioritisetransaction to apply a negative feerate, then the mining code would immediately select it as a super-high-fee transaction. (I stumbled upon this behavior while working on #7063.)
So, concept ACK. I agree with @laanwj's comment about the cast. Also, I think it probably makes most sense to enforce the property that
Also, we should add a unit test that exercises the constructor
Before on 64-bit: