Fixes bug uncovered here: #10169 (review)
[tests] fix wait_for_inv() #10318
pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:fix_wait_for_inv changing 2 files +8 −3-
jnewbery commented at 8:36 PM on May 2, 2017: member
- laanwj added the label Tests on May 3, 2017
-
[tests] fix wait_for_inv() 3e3c22f09d
-
in test/functional/test_framework/mininode.py:1607 in 4787d4b20e outdated
1603 | @@ -1604,7 +1604,10 @@ def wait_for_getheaders(self, timeout=60): 1604 | assert wait_until(test_function, timeout=timeout) 1605 | 1606 | def wait_for_inv(self, expected_inv, timeout=60): 1607 | - test_function = lambda: self.last_message.get("inv") and self.last_message["inv"] != expected_inv 1608 | + """ Currently only checks the first inv object in an inv message"""
MarcoFalke commented at 9:48 AM on May 3, 2017:In which case you might want to
raise NotImplementedErroriflen(expected_inv) >= 2?
jnewbery commented at 1:08 PM on May 3, 2017:Great idea. Thanks. Done.
jnewbery force-pushed on May 3, 2017MarcoFalke requested review from sdaftuar on May 6, 2017sdaftuar approvedsdaftuar commented at 10:13 AM on May 6, 2017: memberThanks for catching this. Looks like this was broken in two ways, which is why the test was succeeding in the first place:
- inequality instead of equality, which only didn't cause problems because
- we were comparing a p2p message with its payload (so the inequality condition would trigger, and the wait_until would return)
utACK
MarcoFalke merged this on May 6, 2017MarcoFalke closed this on May 6, 2017MarcoFalke referenced this in commit 170bc2c381 on May 6, 2017luke-jr commented at 4:33 AM on June 3, 2017: memberNeeds backport?
attilaaf referenced this in commit 90b86ad1dd on May 25, 2019PastaPastaPasta referenced this in commit 6fe30722bd on Jun 10, 2019PastaPastaPasta referenced this in commit 217e971b0a on Jun 10, 2019PastaPastaPasta referenced this in commit fa466c2660 on Jun 10, 2019PastaPastaPasta referenced this in commit 7acbb56a40 on Jun 11, 2019PastaPastaPasta referenced this in commit 41b7b9fc6a on Jun 11, 2019PastaPastaPasta referenced this in commit 454f3a418b on Jun 15, 2019PastaPastaPasta referenced this in commit ba03d85cbd on Jun 19, 2019PastaPastaPasta referenced this in commit bf22e350a6 on Jun 19, 2019PastaPastaPasta referenced this in commit 108337a837 on Jun 19, 2019PastaPastaPasta referenced this in commit a8be72bb55 on Jun 19, 2019PastaPastaPasta referenced this in commit 1171a97950 on Jun 19, 2019PastaPastaPasta referenced this in commit d6e83980da on Jun 19, 2019PastaPastaPasta referenced this in commit b7c12a01e7 on Jun 19, 2019PastaPastaPasta referenced this in commit 3b0ac11ff5 on Jun 20, 2019barrystyle referenced this in commit 8571167dd6 on Jan 22, 2020MarcoFalke 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 18:15 UTC
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 18:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me