litep2p
litep2p copied to clipboard
Use static variables for DNS resolver and crypto noise parameters
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