[tests] Check connectivity before sending in assumevalid.py
commite9e9391083721ca9733cc00a1907384f83b6435e
authorJohn Newbery <john@johnnewbery.com>
Fri, 15 Sep 2017 18:36:12 +0000 (15 14:36 -0400)
committerJohn Newbery <john@johnnewbery.com>
Fri, 15 Sep 2017 18:38:18 +0000 (15 14:38 -0400)
tree0de644e93aa9e2db6b2256267ed5ae1286095cbb
parent09627b1dd41d1151a709d5ead82a924bf59e3d38
[tests] Check connectivity before sending in assumevalid.py

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 passes, but this is a lot of noise in the test log.

Just check that the connection is open before trying to send.
test/functional/assumevalid.py