Adding logging for loop iteration level in p2p_sendheaders.py
Changing logs to debug level and format of statment to j == ... Updating debug statements to include comments when checking for iteration level of i and j Removing comments above log prints in Part 3 Removing unwanted file Added log prints in loops in p2p_sendheaders
This commit is contained in:
parent
29fad97c32
commit
8dd547d82b
1 changed files with 3 additions and 6 deletions
|
@ -411,21 +411,18 @@ class SendHeadersTest(BitcoinTestFramework):
|
||||||
inv_node.check_last_announcement(inv=[tip], headers=[])
|
inv_node.check_last_announcement(inv=[tip], headers=[])
|
||||||
test_node.check_last_announcement(inv=[tip], headers=[])
|
test_node.check_last_announcement(inv=[tip], headers=[])
|
||||||
if i == 0:
|
if i == 0:
|
||||||
# Just get the data -- shouldn't cause headers announcements to resume
|
self.log.debug("Just get the data -- shouldn't cause headers announcements to resume")
|
||||||
test_node.send_get_data([tip])
|
test_node.send_get_data([tip])
|
||||||
test_node.wait_for_block(tip)
|
test_node.wait_for_block(tip)
|
||||||
elif i == 1:
|
elif i == 1:
|
||||||
# Send a getheaders message that shouldn't trigger headers announcements
|
self.log.debug("Send a getheaders message that shouldn't trigger headers announcements to resume (best header sent will be too old)")
|
||||||
# to resume (best header sent will be too old)
|
|
||||||
test_node.send_get_headers(locator=[fork_point], hashstop=new_block_hashes[1])
|
test_node.send_get_headers(locator=[fork_point], hashstop=new_block_hashes[1])
|
||||||
test_node.send_get_data([tip])
|
test_node.send_get_data([tip])
|
||||||
test_node.wait_for_block(tip)
|
test_node.wait_for_block(tip)
|
||||||
elif i == 2:
|
elif i == 2:
|
||||||
test_node.send_get_data([tip])
|
test_node.send_get_data([tip])
|
||||||
test_node.wait_for_block(tip)
|
test_node.wait_for_block(tip)
|
||||||
# This time, try sending either a getheaders to trigger resumption
|
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.")
|
||||||
# of headers announcements, or mine a new block and inv it, also
|
|
||||||
# triggering resumption of headers announcements.
|
|
||||||
if j == 0:
|
if j == 0:
|
||||||
test_node.send_get_headers(locator=[tip], hashstop=0)
|
test_node.send_get_headers(locator=[tip], hashstop=0)
|
||||||
test_node.sync_with_ping()
|
test_node.sync_with_ping()
|
||||||
|
|
Loading…
Reference in a new issue