CTxMemPool::GetMinFee should not return CFeeRate(0) #11455

pull mess110 wants to merge 1 commits into bitcoin:master from mess110:fix_mempool_GetMinFee_bug_returning_below_minRelayTxFee changing 2 files +3 −4
  1. mess110 commented at 3:13 PM on October 5, 2017: contributor

    The ::minRelayTxFee should be taken into account

    This patch comes from #11410 (review) to include minimal code changes when fixing a bug.

    Relates to #11410 and #6941

    Please advise if I should set [fee] in commit message or something similar (thx @fanquake for label :) )

    I ran fundrawtransaction many times, didn't get into problems. See #11410 (comment)

    Next PR will cover ::minRelayTxFee in https://github.com/bitcoin/bitcoin/blob/e93fff1463ae906fc986bf98c3b118c82f171546/src/txmempool.cpp#L1002

  2. CTxMemPool::GetMinFee should not return CFeeRate(0)
    The ::minRelayTxFee should be taken into account
    ab973a8710
  3. fanquake added the label Mempool on Oct 5, 2017
  4. JeremyRubin commented at 5:41 PM on October 6, 2017: contributor

    ~I don't believe this is safe to do, because a 0 fee transaction may be in the mempool as a result of a disconnected block.~

    actually, with how GetMinFee is used, it's probably fine. Sorry for the noise.

  5. TheBlueMatt commented at 6:35 PM on October 6, 2017: member

    Indeed, if there were an invariant in mempool that everything paid at least GetMinFee we'd already violate this (temporarily) in cases where mempool has been limited and we're mid-reorg, and more often when there are dependencies which result in something having a higher limit-enforced fee.

    Still, I'd kinda prefer the original other option where the minRelayTxFee is used directly in getmempoolinfo instead of GetMinFee, in part because it breaks the wallet fee estimation "reason" value (see wallet/fees.cpp:69, which can no longer ever be hit in the fee estimation case as MEMPOOL_MIN will always be set, not a huge deal, but nice to not change that IMO)

  6. MarcoFalke commented at 6:36 PM on October 6, 2017: member

    I was about to comment that this should be maxed with incrementalRelayFee, as mentioned in #11410 (comment).

    But then I don't see why we should keep around both (incrementalrelayfee and minrelaytxfee), as I don't see the difference after removal of pay-by-priority.

    I think my suggestion to create a separate commit for this fix was wrong, as it is not really a bug, but more a inconsistency. I feel we should make the minrelaytxfee command line option an alias of incrementalrelayfee.

  7. MarcoFalke commented at 6:39 PM on October 6, 2017: member

    Might be better to close this and focus on the whole picture (#11410) again.

  8. mess110 closed this on Oct 10, 2017

  9. mess110 deleted the branch on Oct 10, 2017
  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me