Do not un-mark fInMempool on wallet txn if ATMP fails. #11866

pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:2017-12-11839-fixup changing 1 files +1 −6
  1. TheBlueMatt commented at 3:41 PM on December 11, 2017: member

    Irrespective of the failure reason, un-marking fInMempool out-of-order is incorrect - it should be unmarked when TransactionRemovedFromMempool fires.

    Clean up of #11839, which I think was the wrong fix.

  2. Do not un-mark fInMempool on wallet txn if ATMP fails.
    Irrespective of the failure reason, un-marking fInMempool
    out-of-order is incorrect - it should be unmarked when
    TransactionRemovedFromMempool fires.
    6ef86c92e7
  3. laanwj added the label Wallet on Dec 11, 2017
  4. promag commented at 12:10 PM on December 12, 2017: member

    ACK the |= ret change. I would keep the test here.

    At the moment ATMP errors if the transaction is in the mempool:

    https://github.com/bitcoin/bitcoin/blob/d48ab83f00538a5135b2c448809260a9d46ca31c/src/validation.cpp#L502-L505

    So in this case we know how to avoid that error, which is the test added above in #11839.

  5. TheBlueMatt commented at 3:38 PM on December 12, 2017: member

    Exactly, no reason to double-check when ATMP is going to check it for us anyway.

  6. promag commented at 4:29 PM on December 12, 2017: member

    But in the ATMP context being in the mempool is an error, and IMO we shouldn't hit that.

  7. TheBlueMatt commented at 4:37 PM on December 12, 2017: member

    Its no different from a mempool conflict of any other form, and the error is discarded/not printed almost everywhere in wallet (and where it may be, we want the state object to be populated with the appropriate error, not ignored). Worse, its weirdly race-y, with wallet checking something and then calling something else which will check the same thing but with the appropriate locks.

  8. MarcoFalke commented at 9:22 PM on January 25, 2018: member

    utACK 6ef86c92e7fcba866160d7a346fb260d7e4ab5bb

  9. laanwj commented at 3:52 PM on February 14, 2018: member

    utACK

  10. laanwj merged this on Feb 14, 2018
  11. laanwj closed this on Feb 14, 2018

  12. laanwj referenced this in commit 6bb9c13f9a on Feb 14, 2018
  13. jasonbcox referenced this in commit 38a81f1665 on Dec 20, 2019
  14. PastaPastaPasta referenced this in commit 34abb3bc22 on Jun 9, 2020
  15. PastaPastaPasta referenced this in commit 0adef962d1 on Jun 9, 2020
  16. PastaPastaPasta referenced this in commit 11cdaaacfb on Jun 10, 2020
  17. PastaPastaPasta referenced this in commit a4d693f38e on Jun 10, 2020
  18. PastaPastaPasta referenced this in commit 7e426dcf0f on Jun 11, 2020
  19. PastaPastaPasta referenced this in commit 60830846cf on Jun 11, 2020
  20. 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-05-11 18:15 UTC

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