File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "errors"
4
5
"fmt"
5
6
6
7
"github.com/davecgh/go-spew/spew"
@@ -113,13 +114,14 @@ func dumpClosedChannelInfo(chanDb *channeldb.ChannelStateDB) error {
113
114
histChan , err := chanDb .FetchHistoricalChannel (
114
115
& closedChan .ChanPoint ,
115
116
)
116
- switch err {
117
+
118
+ switch {
117
119
// The channel was closed in a pre-historic version of lnd.
118
120
// Ignore the error.
119
- case channeldb .ErrNoHistoricalBucket :
120
- case channeldb .ErrChannelNotFound :
121
+ case errors . Is ( err , channeldb .ErrNoHistoricalBucket ) :
122
+ case errors . Is ( err , channeldb .ErrChannelNotFound ) :
121
123
122
- case nil :
124
+ case err == nil :
123
125
historicalChannels [idx ] = histChan
124
126
125
127
// Non-nil error not due to older versions of lnd.
You can’t perform that action at this time.
0 commit comments