tuweni / org.apache.tuweni.devp2p / Peer / verifyEndpoint

verifyEndpoint

abstract fun verifyEndpoint(endpoint: Endpoint, time: Long): Boolean (source)

Set the lastVerified and lastSeen time to the provided time, if the endpoint matches.

Will only update lastVerified and/or lastSeen if the new time is more recent than their current values.

Parameters

endpoint - the endpoint that was verified, which must match this peer's endpoint

time - the time when the endpoint was verified, in milliseconds since the epoch

Return
true if the endpoint matched the endpoint of this peer