From 09537596fc25bfe1ff5ca2e525ab5a2df9a7b7e7 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Fri, 14 Oct 2022 13:35:05 -0500 Subject: [PATCH] funding+lnwire: remove ErrSynchronizingChain --- docs/release-notes/release-notes-0.16.0.md | 3 +++ funding/manager.go | 3 ++- lnwire/error.go | 9 +-------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/release-notes/release-notes-0.16.0.md b/docs/release-notes/release-notes-0.16.0.md index 2a52a1106..f6703f8c5 100644 --- a/docs/release-notes/release-notes-0.16.0.md +++ b/docs/release-notes/release-notes-0.16.0.md @@ -119,6 +119,9 @@ https://github.com/lightningnetwork/lnd/pull/6963/) * [Stop handling peer warning messages as errors](https://github.com/lightningnetwork/lnd/pull/6840) +* [Stop sending a synchronizing error on the wire when out of + sync](https://github.com/lightningnetwork/lnd/pull/7039). + ## `lncli` * [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice flag](https://github.com/lightningnetwork/lnd/pull/6818) that allows the diff --git a/funding/manager.go b/funding/manager.go index 5e87f16c4..f956a7a87 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -1306,9 +1306,10 @@ func (f *Manager) handleFundingOpen(peer lnpeer.Peer, if err != nil { log.Errorf("unable to query wallet: %v", err) } + err := errors.New("Synchronizing blockchain") f.failFundingFlow( peer, msg.PendingChannelID, - lnwire.ErrSynchronizingChain, + err, ) return } diff --git a/lnwire/error.go b/lnwire/error.go index 74814b59e..120dfc950 100644 --- a/lnwire/error.go +++ b/lnwire/error.go @@ -15,15 +15,10 @@ const ( // active pending channels exceeds their maximum policy limit. ErrMaxPendingChannels FundingError = 1 - // ErrSynchronizingChain is returned by a remote peer that receives a - // channel update or a funding request while it's still syncing to the - // latest state of the blockchain. - ErrSynchronizingChain FundingError = 2 - // ErrChanTooLarge is returned by a remote peer that receives a // FundingOpen request for a channel that is above their current // soft-limit. - ErrChanTooLarge FundingError = 3 + ErrChanTooLarge FundingError = 2 ) // String returns a human readable version of the target FundingError. @@ -31,8 +26,6 @@ func (e FundingError) String() string { switch e { case ErrMaxPendingChannels: return "Number of pending channels exceed maximum" - case ErrSynchronizingChain: - return "Synchronizing blockchain" case ErrChanTooLarge: return "channel too large" default: