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

Remove ErrSynchronizingChain #7039

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/release-notes/release-notes-0.16.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion funding/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
TonyGiorgio marked this conversation as resolved.
Show resolved Hide resolved
f.failFundingFlow(
peer, msg.PendingChannelID,
lnwire.ErrSynchronizingChain,
err,
)
return
}
Expand Down
9 changes: 1 addition & 8 deletions lnwire/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,17 @@ 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crypt-iQ so even though this is declared in the lnwire package, this constant is never used on the wire? So changing the number shouldn't have any side effects? I guess we only created the type for internal handling then...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes its not used on the wire

)

// String returns a human readable version of the target FundingError.
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:
Expand Down