diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-11-13 10:24:49 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-11-13 10:24:51 -0500 |
commit | 5d605b27457dd307e31ac320c83f3b01a41e1ae1 (patch) | |
tree | 0ad0b31529bde62a94cfcb32504fd39b0dd7cf2d /test/functional/test_framework | |
parent | c51e1516a930fe035217ed19d48a3bb726e6b28d (diff) | |
parent | fa2156820877caf70fc09c7e6244b7cde6ebaf29 (diff) | |
download | bitcoin-5d605b27457dd307e31ac320c83f3b01a41e1ae1.tar.xz |
Merge #14700: qa: Avoid race in p2p_invalid_block by waiting for the block request
fa21568208 qa: Avoid race in p2p_invalid_block by waiting for the block request (MarcoFalke)
6c787d340c tests: Make feature_block pass on centos (MarcoFalke)
Pull request description:
This hopefully fixes #14661, which I believe is caused by a race in `send_blocks_and_test`. By setting `request_block=False` we only effectively check `node.getbestblockhash() != blocks[-1].hash` before returning and checking the debug.log. By setting `request_block=True` (the default) we make sure that we send the block, then sync with a ping before asserting on the debug.log.
Even if this patch doesn't fix the issue, it is good cleanup: There is no reason to not wait for the blocks to be requested, since in all these cases the header gives no indication that the block is consensus invalid. So this patch makes the test also a bit stricter and more useful.
Unrelated to this, I also include a fix that makes the tests pass on latest CentOS.
Tree-SHA512: c7abee3b7dc790a8af6c289159a7751bd962f6fa16c1537e7e21a0a0ef05b9596d1f4eb75319614603c05cb803e021314fa3596508ba443edd03046b25527e0f
Diffstat (limited to 'test/functional/test_framework')
0 files changed, 0 insertions, 0 deletions