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 11package  main
22
33import  (
4+ 	"errors" 
45	"fmt" 
56
67	"github.com/davecgh/go-spew/spew" 
@@ -113,13 +114,14 @@ func dumpClosedChannelInfo(chanDb *channeldb.ChannelStateDB) error {
113114		histChan , err  :=  chanDb .FetchHistoricalChannel (
114115			& closedChan .ChanPoint ,
115116		)
116- 		switch  err  {
117+ 
118+ 		switch  {
117119		// The channel was closed in a pre-historic version of lnd. 
118120		// 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 ) :
121123
122- 		case  nil :
124+ 		case  err   ==   nil :
123125			historicalChannels [idx ] =  histChan 
124126
125127		// Non-nil error not due to older versions of lnd. 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments