|
|
@ -1,6 +1,7 @@
|
|
|
|
package main
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
|
@ -113,13 +114,14 @@ func dumpClosedChannelInfo(chanDb *channeldb.ChannelStateDB) error {
|
|
|
|
histChan, err := chanDb.FetchHistoricalChannel(
|
|
|
|
histChan, err := chanDb.FetchHistoricalChannel(
|
|
|
|
&closedChan.ChanPoint,
|
|
|
|
&closedChan.ChanPoint,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
switch err {
|
|
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
// The channel was closed in a pre-historic version of lnd.
|
|
|
|
// The channel was closed in a pre-historic version of lnd.
|
|
|
|
// Ignore the error.
|
|
|
|
// Ignore the error.
|
|
|
|
case channeldb.ErrNoHistoricalBucket:
|
|
|
|
case errors.Is(err, channeldb.ErrNoHistoricalBucket):
|
|
|
|
case channeldb.ErrChannelNotFound:
|
|
|
|
case errors.Is(err, channeldb.ErrChannelNotFound):
|
|
|
|
|
|
|
|
|
|
|
|
case nil:
|
|
|
|
case err == nil:
|
|
|
|
historicalChannels[idx] = histChan
|
|
|
|
historicalChannels[idx] = histChan
|
|
|
|
|
|
|
|
|
|
|
|
// Non-nil error not due to older versions of lnd.
|
|
|
|
// Non-nil error not due to older versions of lnd.
|
|
|
|