Merge pull request #7039 from TonyGiorgio/sync-7034

Remove ErrSynchronizingChain
This commit is contained in:
Oliver Gugger
2022-10-31 08:35:48 +01:00
committed by GitHub
3 changed files with 6 additions and 9 deletions

View File

@@ -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 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` ## `lncli`
* [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice * [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 flag](https://github.com/lightningnetwork/lnd/pull/6818) that allows the

View File

@@ -1306,9 +1306,10 @@ func (f *Manager) handleFundingOpen(peer lnpeer.Peer,
if err != nil { if err != nil {
log.Errorf("unable to query wallet: %v", err) log.Errorf("unable to query wallet: %v", err)
} }
err := errors.New("Synchronizing blockchain")
f.failFundingFlow( f.failFundingFlow(
peer, msg.PendingChannelID, peer, msg.PendingChannelID,
lnwire.ErrSynchronizingChain, err,
) )
return return
} }

View File

@@ -15,15 +15,10 @@ const (
// active pending channels exceeds their maximum policy limit. // active pending channels exceeds their maximum policy limit.
ErrMaxPendingChannels FundingError = 1 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 // ErrChanTooLarge is returned by a remote peer that receives a
// FundingOpen request for a channel that is above their current // FundingOpen request for a channel that is above their current
// soft-limit. // soft-limit.
ErrChanTooLarge FundingError = 3 ErrChanTooLarge FundingError = 2
) )
// String returns a human readable version of the target FundingError. // String returns a human readable version of the target FundingError.
@@ -31,8 +26,6 @@ func (e FundingError) String() string {
switch e { switch e {
case ErrMaxPendingChannels: case ErrMaxPendingChannels:
return "Number of pending channels exceed maximum" return "Number of pending channels exceed maximum"
case ErrSynchronizingChain:
return "Synchronizing blockchain"
case ErrChanTooLarge: case ErrChanTooLarge:
return "channel too large" return "channel too large"
default: default: