Skip to content

[BUG] Peer node socketAddress is not updated when passed a new socketAddress #700

@martinsaposnic

Description

@martinsaposnic

if the LSP node’s IP address changes, calling set_liquidity_source_lsps2 with the new IP doesn’t update the existing peer’s socket address. The node keeps trying to connect using the old one.

if self.peers contains node_id then it returns early:

pub(crate) fn add_peer(&self, peer_info: PeerInfo) -> Result<(), Error> {
		let mut locked_peers = self.peers.write().unwrap();

		if locked_peers.contains_key(&peer_info.node_id) {
			return Ok(());
		}

		locked_peers.insert(peer_info.node_id, peer_info);
		self.persist_peers(&*locked_peers)
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions