Skip to content

Commit 83c7533

Browse files
author
MarcoFalke
committed
Merge #12849: Tests: Add logging in loops in p2p_sendhears.py
8dd547d Adding logging for loop iteration level in p2p_sendheaders.py (ccdle12) Pull request description: PR for #12453 New contributor looking at mainly the 'good first issues'. From my understanding of the issue: * Track the iteration level of loop when test fails in Travis CI Further clarification on the issue would be greatly appreciated to narrow down what can be fixed or updated. Tree-SHA512: 228524aad54c09979d990a0fc6818e13a11e1ab5e78b606b892e897bba7b1e09bf25447feb631049e45ac017eeb61fbf1c1f11e8bd5103648f976a05099ba9f9
2 parents 69310a3 + 8dd547d commit 83c7533

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/functional/p2p_sendheaders.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,21 +411,18 @@ def test_nonnull_locators(self, test_node, inv_node):
411411
inv_node.check_last_announcement(inv=[tip], headers=[])
412412
test_node.check_last_announcement(inv=[tip], headers=[])
413413
if i == 0:
414-
# Just get the data -- shouldn't cause headers announcements to resume
414+
self.log.debug("Just get the data -- shouldn't cause headers announcements to resume")
415415
test_node.send_get_data([tip])
416416
test_node.wait_for_block(tip)
417417
elif i == 1:
418-
# Send a getheaders message that shouldn't trigger headers announcements
419-
# to resume (best header sent will be too old)
418+
self.log.debug("Send a getheaders message that shouldn't trigger headers announcements to resume (best header sent will be too old)")
420419
test_node.send_get_headers(locator=[fork_point], hashstop=new_block_hashes[1])
421420
test_node.send_get_data([tip])
422421
test_node.wait_for_block(tip)
423422
elif i == 2:
424423
test_node.send_get_data([tip])
425424
test_node.wait_for_block(tip)
426-
# This time, try sending either a getheaders to trigger resumption
427-
# of headers announcements, or mine a new block and inv it, also
428-
# triggering resumption of headers announcements.
425+
self.log.debug("This time, try sending either a getheaders to trigger resumption of headers announcements, or mine a new block and inv it, also triggering resumption of headers announcements.")
429426
if j == 0:
430427
test_node.send_get_headers(locator=[tip], hashstop=0)
431428
test_node.sync_with_ping()

0 commit comments

Comments
 (0)