def METHOD_NAME(self, expected_connection_count):
    self.log.info("disable and re-enable networking on all masternodes")
    for mn in self.mninfo:
        mn.node.setnetworkactive(False)
    for mn in self.mninfo:
        wait_until(lambda: len(mn.node.getpeerinfo()) == 0)
    for mn in self.mninfo:
        mn.node.setnetworkactive(True)
    self.bump_mocktime(60)
    self.log.info("verify that all masternodes re-connected")
    for q in self.nodes[0].quorum('list')['llmq_test']:
        for mn in self.get_quorum_masternodes(q):
            self.wait_for_mnauth(mn.node, expected_connection_count)
    # Also re-connect non-masternode connections
    for i in range(1, len(self.nodes)):
        connect_nodes(self.nodes[i], 0)
        self.nodes[i].ping()
    # wait for ping/pong so that we can be sure that spork propagation works
    time.sleep(1) # needed to make sure we don't check before the ping is actually sent (fPingQueued might be true but SendMessages still not called)
    for i in range(1, len(self.nodes)):
        wait_until(lambda: all('pingwait' not in peer for peer in self.nodes[i].getpeerinfo()))