New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test+server: finalize inbound/outbound fixes, update itests to account for fixes #1349
test+server: finalize inbound/outbound fixes, update itests to account for fixes #1349
Conversation
e62f862
to
18de558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍹
d1e0a88
to
9d1d1b7
Compare
In this commit, we modify the look up for inbound peers to ensure that we connect to the "freshest" address until we need to execute the peerTerminationWatcher. We do this as it's possible for a channel to be created by the remote peer during our session. If we don't query for the node's address at the latest point, then we'll miss this new node announcement for the node.
…a scheduled callback In this commit, we ensure that if we're already ignoring a connection, then we also ignore the pending persistent connection request. Otherwise, we'll move to accept the replaced connection, but then continue to attempt connection requests.
…nection logic With the recent bug fixes in the peer connection, it's no longer the case that just disconnecting a certain peer causes it to no longer connect to the other. As a result, we now shutdown Alice to ensure no reconnection occurs. We'll then later restart alice when we restart dave.
In this commit, we finish the fix for the inbound/outbound peer bool in the server. The prior commit forgot to also flip the inbound/output maps in Inbound/Outbound peer connected. As a result, the checks were incorrect and could cause lnd to refuse to accept any more inbound connections in the case of a concurrent connection attempt.
9d1d1b7
to
418ecba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👏
(but integration tests are failing....?)
As the PR is incomplete, once #1351 is finalized, we should make a joint PR to confirm it resolves the current issues. |
1549677
to
418ecba
Compare
In this commit, we fix the logging when adding new gossip syncers. The old log would log the byte array, rather than the byte slice. We fix this by slicing before logging.
…Link In this commit, we modify the interfaceIndex to no longer key the second level of the index by the ChannelLink. Instead, we'll use the chan ID as it's a stable identifier, unlike a reference to an interface.
In this commit, we fix a bug in the way we handle removing items from the interfaceIndex. Before this commit, we would delete all items items with the target public key that of the peer that owns the link being removed. However, this is incorrect as the peer may have other links sill active. In this commit, we fix this by first only deleting the link from the peer's index, and then checking to see if the index is empty after this deletion. Only if so do we delete the index for the peer all together.
In this commit we fix an existing bug which could cause internal state inconsistency between then switch, funding manager, and the peer. Before this commit, we would _always_ add a new channel to the channelManager. However, due to recent logic, it may be the case that this isn't the channel that will ultimately reside in the link. As a result, we would be unable to process incoming FundingLocked messages properly, as we would mutate the incorrect channel in memory. We remedy this by moving the inserting of the new channel into the activeChannels map until the end of the loadActiveChannels method, where we know that this will be the link that persists.
7c5eebf
to
e60d2b7
Compare
We're green now 💚 |
Fixes #1337.
Fixes #1360.
Fixes #1361.
Fixes #1365.
Fixes #1366.