Skip to content

Commit

Permalink
Remove ErrSynchronizingChain
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGiorgio committed Oct 27, 2022
1 parent 81b17ef commit 5bc7969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
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")
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
)

// 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

0 comments on commit 5bc7969

Please sign in to comment.