qa: Fix race condition failures in replace-by-fee.py, sendheaders.py #11538

pull sdaftuar wants to merge 2 commits into bitcoin:master from sdaftuar:2017-10-fix-rbf-test changing 2 files +16 −1
  1. sdaftuar commented at 8:13 PM on October 20, 2017: member

    I think #11407 broke replace-by-fee by introducing a race condition. I was observing frequent failures of replace-by-fee locally, always with a mempool sync failure (the sync call was added in #11407).

    It appeared to me like there were two causes: sometimes the node would be in IBD and not request the transaction that was relayed; other times the blocks generated in make_utxo wouldn't have relayed quickly enough for the spend of the transaction to be accepted. I believe I've fixed both potential errors.

    ping @instagibbs

    Edit: I found a race condition in the sendheaders.py test, where if the verack from the python node wasn't processed before the first block in the test was generated, then no block announcement would go out to that peer, breaking the test. Fixed by adding a sync_with_ping after waiting for verack.

  2. qa: Fix replace-by-fee race condition failures c96b2e4f09
  3. sdaftuar renamed this:
    qa: Fix replace-by-fee race condition failures
    qa: Fix race condition failures in replace-by-fee.py, sendheaders.py
    on Oct 20, 2017
  4. sdaftuar commented at 8:25 PM on October 20, 2017: member

    Example of the sendheaders failure is here: https://travis-ci.org/bitcoin/bitcoin/jobs/290599516

  5. fanquake added the label Tests on Oct 20, 2017
  6. in test/functional/replace-by-fee.py:77 in c96b2e4f09 outdated
      71 | @@ -72,6 +72,10 @@ def set_test_params(self):
      72 |                             ["-mempoolreplacement=0"]]
      73 |  
      74 |      def run_test(self):
      75 | +        # Leave IBD and ensure nodes are synced
      76 | +        self.nodes[0].generate(1)
      77 | +        self.sync_all()
    


    instagibbs commented at 2:02 PM on October 21, 2017:

    maybe stick the sync_call after the first make_utxo on line 79, just to be sure in the future?


    sdaftuar commented at 12:55 PM on October 23, 2017:

    Sounds good, done.

  7. instagibbs approved
  8. instagibbs commented at 2:04 PM on October 21, 2017: member

    utACK

  9. MarcoFalke commented at 6:33 PM on October 21, 2017: member

    utACK eb0064be6f33c3d0015d84be38eee4f7256d943b

  10. MarcoFalke added the label Needs backport on Oct 21, 2017
  11. MarcoFalke added this to the milestone 0.15.1 on Oct 21, 2017
  12. jonasschnelli commented at 1:36 AM on October 23, 2017: contributor

    utACK eb0064be6f33c3d0015d84be38eee4f7256d943b

  13. qa: Fix race condition in sendheaders.py 6d51eaefe9
  14. sdaftuar force-pushed on Oct 23, 2017
  15. jnewbery commented at 1:34 PM on October 23, 2017: member

    tested ACK 6d51eaefe924bfaf2b0f4928dd6020023733480f

  16. MarcoFalke referenced this in commit fdad04e617 on Oct 23, 2017
  17. MarcoFalke referenced this in commit adbc9d164a on Oct 23, 2017
  18. MarcoFalke merged this on Oct 23, 2017
  19. MarcoFalke closed this on Oct 23, 2017

  20. MarcoFalke referenced this in commit 57ee73990f on Oct 23, 2017
  21. fanquake commented at 1:47 PM on November 1, 2017: member

    Backported in #11550

  22. fanquake removed the label Needs backport on Nov 1, 2017
  23. codablock referenced this in commit 8928a8beca on Sep 26, 2019
  24. codablock referenced this in commit 55550b8dd7 on Sep 30, 2019
  25. barrystyle referenced this in commit e4491305b7 on Jan 22, 2020
  26. 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-14 12:15 UTC

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