validate_token

Function validate_token 

Source
pub fn validate_token(
    key: &TokenKey,
    token: &[u8],
    expected_peer: &PeerId,
    expected_cid: &ConnectionId,
) -> bool
Expand description

Validate a retry/validation token against the expected peer and connection ID. Returns true if the token decodes and matches both identifiers.