Skip to content

v0.7.0-rc.26

Choose a tag to compare

@ben-kaufman ben-kaufman released this 21 Feb 15:45
d2a82a2
fix: upsert peer address on connect and bump to v0.7.0-rc.26

PeerStore::add_peer previously returned early if a peer already existed,
silently discarding address updates. When an LSP node's IP changed, the
reconnection loop would indefinitely retry the stale cached address.

This commit:
1. Changes add_peer to upsert: if the peer exists but the address
   differs, update and re-persist it.
2. Reorders Node::connect to persist the peer *before* attempting the
   connection, so the new address is saved even if the connection
   races with an in-flight reconnection attempt at the old address.
3. Adds unit tests for the upsert logic and an integration test for
   persist-on-failed-connect.

See upstream issue lightningdevkit/ldk-node#700.

Co-authored-by: Cursor <cursoragent@cursor.com>