diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-08-10 21:35:29 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-08-10 21:29:48 +0200 |
commit | faa76d1b79cc63177c8e165c9a2dc761aac7ccf4 (patch) | |
tree | d8c662584827bf1dd847440c92675e56c0dea551 /test | |
parent | 2507fd55568b361080e9127f40584af2df64f76e (diff) |
qa: Fix inv race in example_test
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/example_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 1ba5f756cd..7709524f23 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -58,6 +58,10 @@ class BaseNode(NodeConnCB): message.block.calc_sha256() self.block_receive_map[message.block.sha256] += 1 + def on_inv(self, conn, message): + """Override the standard on_inv callback""" + pass + def custom_function(): """Do some custom behaviour @@ -198,10 +202,10 @@ class ExampleTest(BitcoinTestFramework): self.log.info("Wait for node2 reach current tip. Test that it has propogated all the blocks to us") + getdata_request = msg_getdata() for block in blocks: - getdata_request = msg_getdata() getdata_request.inv.append(CInv(2, block)) - node2.send_message(getdata_request) + node2.send_message(getdata_request) # wait_until() will loop until a predicate condition is met. Use it to test properties of the # NodeConnCB objects. |