Description
Refactor MaybeDiscourageAndDisconnect to accept individual parameters (has_no_ban, is_manual, is_local_addr, is_inbound_onion, peer_addr) instead of taking a CNode& reference directly.
This decouples the function from CNode while preserving all original logic paths and behavior.
This change is just a refactor, so no tests were modified
Linked issue
This is a part of #33958. Let me know if this is not needed and I can close this PR