kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a stable version at the initial rollout phases.
ISC License
376 stars 119 forks source link

Refactor p2p port handling #318

Closed biryukovmaxim closed 7 months ago

biryukovmaxim commented 7 months ago

Changed the handling of default p2p port. Previously, a fixed port was being used which was not serving the purpose when the operator runs a node and specifies a non-standard local port. The revised code implements variable 'desired_external_port' to set the port number from the normalized peer-to-peer listening address. This allows the use of a non-standard public address. This change makes the system more adaptable to operator wishes and avoids potential conflicts.