contractcourt: catch error when no historical bucket exists
For older nodes, this bucket was never created, so we'll get an error if we try and query it. In this commit, we catch this error like we do when a given channel doesn't have the information (but the bucket actually exists). Fixes #6155
This commit is contained in:
3 files changed
+9
-3
No files matched your search
@@ -618,6 +618,8 @@ func (c *ChannelArbitrator) relaunchResolvers(commitSet *CommitSet,
|
||||
// If we don't find this channel, then it may be the case that it
|
||||
// was closed before we started to retain the final state
|
||||
// information for open channels.
|
||||
case err == channeldb.ErrNoHistoricalBucket:
|
||||
fallthrough
|
||||
case err == channeldb.ErrChannelNotFound:
|
||||
log.Warnf("ChannelArbitrator(%v): unable to fetch historical "+
|
||||
"state", c.cfg.ChanPoint)
|
||||
@@ -1947,6 +1949,8 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
// If we don't find this channel, then it may be the case that it
|
||||
// was closed before we started to retain the final state
|
||||
// information for open channels.
|
||||
case err == channeldb.ErrNoHistoricalBucket:
|
||||
fallthrough
|
||||
case err == channeldb.ErrChannelNotFound:
|
||||
log.Warnf("ChannelArbitrator(%v): unable to fetch historical "+
|
||||
"state", c.cfg.ChanPoint)
|
||||
|
||||
Reference in new issue
Block a user