Skip to content
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

Add workaround for lnd sync issue #1563

Merged
merged 2 commits into from
Oct 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,15 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
goto(NEGOTIATING) using d.copy(closingTxProposed = closingTxProposed1) sending d.localShutdown
}

// This handler is a workaround for an issue in lnd: starting with versions 0.10 / 0.11, they sometimes fail to send
// a channel_reestablish when reconnecting a channel that recently got confirmed, and instead send a funding_locked
// first and then go silent. This is due to a race condition on their side, so we trigger a reconnection, hoping that
// we will eventually receive their channel_reestablish.
case Event(_: FundingLocked, _) =>
log.error("received funding_locked before channel_reestablish (known lnd bug): disconnecting...")
t-bast marked this conversation as resolved.
Show resolved Hide resolved
peer ! Peer.Disconnect(remoteNodeId)
stay

case Event(c: CurrentBlockCount, d: HasCommitments) => handleNewBlock(c, d)

case Event(c: CurrentFeerates, d: HasCommitments) =>
Expand Down