message: test: Avoid race after connect_nodes
diff: @@ -561,8 +561,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
  self.nodes[i].process.wait(timeout)
  def connect_nodes(self, a, b):
  - def connect_nodes_helper(from_connection, node_num):
  - ip_port = "127.0.0.1:" + str(p2p_port(node_num))
  + from_connection = self.nodes[a]
  + to_connection = self.nodes[b]
  + ip_port = "127.0.0.1:" + str(p2p_port(b))
  from_connection.addnode(ip_port, "onetry")
  # poll until version handshake complete to avoid race conditions
  # with transaction relaying
  @@ -570,9 +571,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
  # * Must have a version message before anything else
  # * Must have a verack message before anything else
  wait_until_helper(lambda: all(peer['version'] != 0 for peer in from_connection.getpeerinfo()))
  + wait_until_helper(lambda: all(peer['version'] != 0 for peer in to_connection.getpeerinfo()))
  wait_until_helper(lambda: all(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in from_connection.getpeerinfo()))
  -
  - connect_nodes_helper(self.nodes[a], b)
  + wait_until_helper(lambda: all(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in to_connection.getpeerinfo()))
  def disconnect_nodes(self, a, b):
  def disconnect_nodes_helper(from_connection, node_num):
  