An empty addnode= entry currently creates an empty added-node record. The node then repeatedly attempts to connect to the empty destination:
2026-07-23T19:22:33Z [net] trying v2 connection (manual) to , lastseen=0.0hrs
2026-07-23T19:23:33Z [net] trying v2 connection (manual) to , lastseen=0.0hrs
2026-07-23T19:24:34Z [net] trying v2 connection (manual) to , lastseen=0.0hrs
With this change, the node ignores empty -addnode values when initializing the connection manager. This preserves the existing startup behavior while avoiding useless connection attempts. Non-empty values are unaffected. Values consisting only of whitespace are ignored as well, and every ignored value is logged.
The addnode RPC has the same issue, so it now returns Error: Node address cannot be empty instead of adding such a record.
Functional tests verify that the node starts with addnode=, that no added-node record is created while non-empty values are still added, and that the RPC rejects empty values.