diff options
| author | MarcoFalke <[email protected]> | 2017-09-18 16:02:24 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2017-09-18 16:02:29 +0200 |
| commit | 44e1fd926cfb0df0fbd8c41de8cd65ed8d5d6e18 (patch) | |
| tree | dff709f2879bed21102efadb27162405394130d7 | |
| parent | Merge #11340: Trivial: Fix validation comments (diff) | |
| parent | [tests] Check connectivity before sending in assumevalid.py (diff) | |
| download | discoin-44e1fd926cfb0df0fbd8c41de8cd65ed8d5d6e18.tar.xz discoin-44e1fd926cfb0df0fbd8c41de8cd65ed8d5d6e18.zip | |
Merge #11345: [tests] Check connectivity before sending in assumevalid.py
e9e939108 [tests] Check connectivity before sending in assumevalid.py (John Newbery)
Pull request description:
assumevalid.py would try to send over a closed P2P connection in a loop,
hitting the following failure many times:
`TestFramework.mininode (ERROR): Cannot send message. No connection to node!`
The test still passed, but this is a lot of noise in the test log.
Just check that the connection is open before trying to send.
Tree-SHA512: 6faf2ce5717de976fed1b5c863bc8d17e785928690f833d5bf175178f95d39f455635a844fe7e0dfdad83ae779dd45bc6e4ed89a9467d8482c5be73b55095c8d
| -rwxr-xr-x | test/functional/assumevalid.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/assumevalid.py b/test/functional/assumevalid.py index beaf8c705..65685c48b 100755 --- a/test/functional/assumevalid.py +++ b/test/functional/assumevalid.py @@ -68,6 +68,8 @@ class AssumeValidTest(BitcoinTestFramework): def send_blocks_until_disconnected(self, node): """Keep sending blocks to the node until we're disconnected.""" for i in range(len(self.blocks)): + if not node.connection: + break try: node.send_message(msg_block(self.blocks[i])) except IOError as e: |