[qa] mininode: Expose connection state through is_connected

This commit is contained in:
MarcoFalke
2018-06-20 21:24:29 -04:00
parent ac3224c8ee
commit fa1eac9cdb
5 changed files with 51 additions and 47 deletions

View File

@@ -87,7 +87,7 @@ class TestP2PConn(P2PInterface):
This is used when we want to send a message into the node that we expect
will get us disconnected, eg an invalid block."""
self.send_message(message)
wait_until(lambda: self.state != "connected", timeout=timeout, lock=mininode_lock)
wait_until(lambda: not self.is_connected, timeout=timeout, lock=mininode_lock)
class CompactBlocksTest(BitcoinTestFramework):
def set_test_params(self):