litep2p icon indicating copy to clipboard operation
litep2p copied to clipboard

Use static variables for DNS resolver and crypto noise parameters

Open lexnv opened this issue 5 months ago • 0 comments

This PR uses std::sync::OnceLock to create reusable variables only once:

  • crypto/noise parameters are parsing the provided string only once
  • tokio DNS resolver uses the same variable to leverage the DNS internal caching

cc @paritytech/networking

lexnv avatar Sep 03 '24 10:09 lexnv