IGNITE-23850 Remove IgniteFeatures#TCP_COMMUNICATION_SPI_HANDSHAKE_WAIT_MESSAGE and related code (#11733)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
index f095b30..0bb9bf7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
@@ -21,8 +21,6 @@
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.cluster.ClusterState;
 import org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi;
-import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
-import org.apache.ignite.spi.communication.tcp.messages.HandshakeWaitMessage;
 import org.apache.ignite.spi.discovery.DiscoverySpi;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_PME_FREE_SWITCH_DISABLED;
@@ -33,11 +31,6 @@
  * Defines supported features and check its on other nodes.
  */
 public enum IgniteFeatures {
-    /**
-     * Support of {@link HandshakeWaitMessage} by {@link TcpCommunicationSpi}.
-     */
-    TCP_COMMUNICATION_SPI_HANDSHAKE_WAIT_MESSAGE(0),
-
     /** Support of splitted cache configurations to avoid broken deserialization on non-affinity nodes. */
     SPLITTED_CACHE_CONFIGURATIONS(5),
 
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ClusterStateProvider.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ClusterStateProvider.java
index 80f22df..f6fe46c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ClusterStateProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ClusterStateProvider.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.spi.communication.tcp.internal;
 
-import java.util.Collection;
 import java.util.UUID;
 import java.util.function.Supplier;
 import javax.net.ssl.SSLEngine;
@@ -25,15 +24,11 @@
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteFeatures;
 import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.spi.IgniteSpiContext;
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
-import org.apache.ignite.spi.communication.tcp.messages.HandshakeWaitMessage;
 import org.apache.ignite.spi.communication.tcp.messages.NodeIdMessage;
-import org.apache.ignite.spi.discovery.DiscoverySpi;
 
 /**
  * The role of this is aggregate logic of cluster states.
@@ -160,23 +155,6 @@
     }
 
     /**
-     * Checks whether remote nodes support {@link HandshakeWaitMessage}.
-     *
-     * @return {@code True} if remote nodes support {@link HandshakeWaitMessage}.
-     */
-    public boolean isHandshakeWaitSupported() {
-        DiscoverySpi discoSpi = ignite.configuration().getDiscoverySpi();
-
-        if (discoSpi instanceof IgniteDiscoverySpi)
-            return ((IgniteDiscoverySpi)discoSpi).allNodesSupport(IgniteFeatures.TCP_COMMUNICATION_SPI_HANDSHAKE_WAIT_MESSAGE);
-        else {
-            Collection<ClusterNode> nodes = discoSpi.getRemoteNodes();
-
-            return IgniteFeatures.allNodesSupports(nodes, IgniteFeatures.TCP_COMMUNICATION_SPI_HANDSHAKE_WAIT_MESSAGE);
-        }
-    }
-
-    /**
      * @return Node ID message.
      */
     public NodeIdMessage nodeIdMessage() {
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/InboundConnectionHandler.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/InboundConnectionHandler.java
index 3463be4..8107493 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/InboundConnectionHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/InboundConnectionHandler.java
@@ -228,7 +228,7 @@
             }
 
             try {
-                if (client || ctxInitLatch.getCount() == 0 || !stateProvider.isHandshakeWaitSupported()) {
+                if (client || ctxInitLatch.getCount() == 0) {
                     if (log.isDebugEnabled())
                         log.debug("Sending local node ID to newly accepted session: " + ses);