Skip to main content

validate_handshake

Function validate_handshake 

Source
pub fn validate_handshake(
    local: &HandshakeRequest,
    remote: &HandshakeRequest,
) -> HandshakeResponse
Expand description

Validate a remote node’s HandshakeRequest against local configuration.

Returns a HandshakeResponse indicating whether the connection is accepted.

The check order is:

  1. Wire protocol compatibility (same MAJOR version)
  2. Adapter match (must be the same adapter)