test: Fix intermittent failure in wallet_importmulti #18753

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2004-testFixInIm changing 1 files +8 −1
  1. MarcoFalke commented at 11:02 PM on April 23, 2020: member

    The wallet is async, so after generating a block, we must call syncwithvalidationinterfacequeue. Otherwise the timestamp will be of the previous block.

    https://travis-ci.org/github/bitcoin/bitcoin/jobs/677685073#L2648

  2. test: Fix intermittent failure in wallet_importmulti fa8b9b5d1f
  3. fanquake added the label Tests on Apr 23, 2020
  4. in test/functional/wallet_importmulti.py:67 in fa8b9b5d1f
      63 | @@ -63,6 +64,7 @@ def run_test(self):
      64 |          self.nodes[0].generate(1)
      65 |          self.nodes[1].generate(1)
      66 |          timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime']
      67 | +        self.nodes[1].syncwithvalidationinterfacequeue()
    


    robot-visions commented at 5:42 PM on April 24, 2020:

    Just to make sure I understand correctly, what's the motivation for putting syncwithvalidationinterfacequeue after (instead of before) getting the timestamp value?


    MarcoFalke commented at 6:14 PM on April 24, 2020:

    getbestblockhash directly accesses the chainstate, so it is not needed there.

    The wallet only gets the chainstate async over the validationinterface, so it is needed there.

  5. promag commented at 2:16 PM on April 26, 2020: member

    ACK fa8b9b5d1f48ad95eecf47ebbd7bf374777fc621.

  6. MarcoFalke merged this on Apr 26, 2020
  7. MarcoFalke closed this on Apr 26, 2020

  8. MarcoFalke deleted the branch on Apr 26, 2020
  9. sidhujag referenced this in commit 21e6c95e5d on Apr 26, 2020
  10. Fabcien referenced this in commit f339a4f6d6 on Jan 21, 2021
  11. PastaPastaPasta referenced this in commit 4b405b4c8b on Dec 22, 2021
  12. PastaPastaPasta referenced this in commit 225f61941a on Dec 22, 2021
  13. PastaPastaPasta referenced this in commit 1765c2e71b on Dec 22, 2021
  14. PastaPastaPasta referenced this in commit 1c3be8f61b on Dec 28, 2021
  15. DrahtBot locked this on Feb 15, 2022

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-17 06:14 UTC

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