diff options
| author | Matt Corallo <[email protected]> | 2016-10-03 18:30:52 -0400 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-11-07 17:38:22 -0500 |
| commit | 3451203b5c67c234d168a409d69ff9623573dae3 (patch) | |
| tree | afb4b1995469db781d2e22e61b38a10912e46b24 /qa/rpc-tests/sendheaders.py | |
| parent | [qa] Make comptool push blocks instead of relying on inv-fetch (diff) | |
| download | discoin-3451203b5c67c234d168a409d69ff9623573dae3.tar.xz discoin-3451203b5c67c234d168a409d69ff9623573dae3.zip | |
[qa] Respond to getheaders and do not assume a getdata on inv
Diffstat (limited to 'qa/rpc-tests/sendheaders.py')
| -rwxr-xr-x | qa/rpc-tests/sendheaders.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/qa/rpc-tests/sendheaders.py b/qa/rpc-tests/sendheaders.py index 81b2442e6..37b98c576 100755 --- a/qa/rpc-tests/sendheaders.py +++ b/qa/rpc-tests/sendheaders.py @@ -348,14 +348,13 @@ class SendHeadersTest(BitcoinTestFramework): if j == 0: # Announce via inv test_node.send_block_inv(tip) - test_node.wait_for_getdata([tip], timeout=5) + test_node.wait_for_getheaders(timeout=5) + # Should have received a getheaders now + test_node.send_header_for_blocks(blocks) # Test that duplicate inv's won't result in duplicate # getdata requests, or duplicate headers announcements - inv_node.send_block_inv(tip) - # Should have received a getheaders as well! - test_node.send_header_for_blocks(blocks) - test_node.wait_for_getdata([x.sha256 for x in blocks[0:-1]], timeout=5) - [ inv_node.send_block_inv(x.sha256) for x in blocks[0:-1] ] + [ inv_node.send_block_inv(x.sha256) for x in blocks ] + test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=5) inv_node.sync_with_ping() else: # Announce via headers |