def send_await_disconnect(self, message, timeout=30):
    'Sends a message to the node and wait for disconnect.\n\n        This is used when we want to send a message into the node that we expect\n        will get us disconnected, eg an invalid block.'
    self.send_message(message)
    wait_until((lambda : (not self.connected)), timeout=timeout, lock=mininode_lock)
Sends a message to the node and wait for disconnect.

This is used when we want to send a message into the node that we expect
will get us disconnected, eg an invalid block.
def send_await_disconnect(self, message, timeout=30):
    'Sends a message to the node and wait for disconnect.\n\n        This is used when we want to send a message into the node that we expect\n        will get us disconnected, eg an invalid block.'
    self.send_message(message)
    wait_until((lambda : (not self.connected)), timeout=timeout, lock=mininode_lock)