From d24f12bd0bbc704560c1092a44fc9883a0ef30f8 Mon Sep 17 00:00:00 2001 From: Yong Date: Wed, 30 Aug 2023 01:27:09 +0800 Subject: [PATCH] contractcourt: fix potential panic during startup (#7936) Related to this fix 5a285827194f85af10c138da735b35a1faee97aa, we may not have the historical data for old channels so we skip it here too. --- contractcourt/channel_arbitrator.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/contractcourt/channel_arbitrator.go b/contractcourt/channel_arbitrator.go index 33b3385d2..202c5d138 100644 --- a/contractcourt/channel_arbitrator.go +++ b/contractcourt/channel_arbitrator.go @@ -731,13 +731,14 @@ func (c *ChannelArbitrator) relaunchResolvers(commitSet *CommitSet, if chanState != nil { resolver.SupplementState(chanState) - } - // For taproot channels, we'll need to also make sure the - // control block information was set properly. - maybeAugmentTaprootResolvers( - chanState.ChanType, resolver, contractResolutions, - ) + // For taproot channels, we'll need to also make sure + // the control block information was set properly. + maybeAugmentTaprootResolvers( + chanState.ChanType, resolver, + contractResolutions, + ) + } unresolvedContracts[i] = resolver