Added handling for the case where headers are announced over more than one message. refs #12453
[tests] Fixed intermittent failure in p2p_sendheaders.py. #13192
pull lmanners wants to merge 1 commits into bitcoin:master from lmanners:p2p_sendheaders changing 1 files +51 −45-
lmanners commented at 10:36 PM on May 8, 2018: contributor
-
12d1b77f7e
[tests] Fixed intermittent failure in p2p_sendheaders.py.
Added handling for the case where headers are announced over more than one message. refs #12453
- fanquake added the label Tests on May 8, 2018
- fanquake requested review from jnewbery on May 9, 2018
-
laanwj commented at 2:56 PM on May 9, 2018: member
Concept ACK
-
in test/functional/p2p_sendheaders.py:167 in 12d1b77f7e
163 | @@ -163,40 +164,45 @@ def on_inv(self, message): 164 | def on_headers(self, message): 165 | if len(message.headers): 166 | self.block_announced = True 167 | - message.headers[-1].calc_sha256() 168 | + for x in message.headers:
jnewbery commented at 3:07 PM on May 9, 2018:nit: prefer
headeras variable name overxin test/functional/p2p_sendheaders.py:264 in 12d1b77f7e
260 | @@ -255,25 +261,25 @@ def test_null_locators(self, test_node, inv_node): 261 | tip = self.nodes[0].getblockheader(self.nodes[0].generate(1)[0]) 262 | tip_hash = int(tip["hash"], 16) 263 | 264 | - inv_node.check_last_announcement(inv=[tip_hash], headers=[]) 265 | - test_node.check_last_announcement(inv=[tip_hash], headers=[]) 266 | + inv_node.check_last_inv_announcement(inv=[tip_hash])
jnewbery commented at 3:09 PM on May 9, 2018:Calling the method with a named argument isn't strictly necessary, since the method only takes a single argument now, but it does no harm.
jnewbery commented at 3:12 PM on May 9, 2018: memberThanks for this contribution @lmanners. Looks great!
Tested ACK 12d1b77f7eb2ca274890d9fb45d6c19a40ba8f74. I've run this 100 times locally and not been able to reproduce the error (although note that this was a timing error that was previously only seen on Travis).
A nit and a comment inline, but no need to update the branch for either of those. I think this can be merged as is.
MarcoFalke commented at 3:04 PM on May 10, 2018: memberutACK 12d1b77f7eb2ca274890d9fb45d6c19a40ba8f74
MarcoFalke added this to the milestone 0.16.1 on May 10, 2018MarcoFalke added the label Needs backport on May 10, 2018MarcoFalke merged this on May 10, 2018MarcoFalke closed this on May 10, 2018MarcoFalke referenced this in commit 1c58250350 on May 10, 2018lmanners deleted the branch on May 13, 2018fanquake added this to the "For backport" column in a project
MarcoFalke removed the label Needs backport on May 24, 2018MarcoFalke removed this from the "For backport" column in a project
MarcoFalke referenced this in commit c6eb2d47d8 on May 24, 2018MarcoFalke referenced this in commit d838d52bfb on May 24, 2018MarcoFalke referenced this in commit 8c5ba1875b on May 29, 2018MarcoFalke referenced this in commit 79c4fff9ed on Jul 12, 2018PastaPastaPasta referenced this in commit 37692ecc04 on Apr 11, 2020PastaPastaPasta referenced this in commit 6dfb5a7377 on Apr 16, 2020ckti referenced this in commit d008913103 on Mar 28, 2021MarcoFalke locked this on Sep 8, 2021ContributorsLabelsMilestone
0.16.1
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 09: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-17 09: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