wallet: allow mintxfee=0#1333
Conversation
This check for 0 feerate was inherited from upstream, and subsequently removed in this commit: bitcoin/bitcoin@f11eb1f
tomt1664
left a comment
There was a problem hiding this comment.
HasValidFee is a consensus check (in CheckTxInputs) which was introduced with CA.
I'm not sure why the fee == 0 was originally added, as a transaction without any fee output (i.e. also zero fee) is consensus valid. (the fee == 0 check in only applied to individual fee outputs, not the total fees for the tx).
I've verified that removing this fee == 0 check will cause a hard-fork if a zero fee output tx is confirmed in a block.
Suggestion: we add a -con_ config parameter (e.g. -con_allowanyfee) that removes this optionally.
I think that part was inherited from upstream initially
Good idea, thanks |
|
Modified so that the wallet now creates a transaction without a fee output if the This is consensus valid and so the Functional test updated to verify number of transaction outputs and no fee output in zero fee case. |
|
Hey @tomt1664 the macos failure is because the wallet in that job is sqlite (descriptors) only - I'm able to repro on macos by running |
|
ACK ab5777e Ran tests locally |
Allow
-mintxfee=0, so the elements wallet can create transactions with 0 value fee outputs.Elements can already accept 0 value fees with
-minrelaytxfee=0and-blockmintxfee=0, but before this change the wallet would not create a transaction with 0 feerate.Note: this check for 0 was inherited from upstream and subsequently removed in bitcoin/bitcoin@f11eb1f