diff --git a/contractcourt/channel_arbitrator.go b/contractcourt/channel_arbitrator.go index eeb8850f7..b19bae7fe 100644 --- a/contractcourt/channel_arbitrator.go +++ b/contractcourt/channel_arbitrator.go @@ -553,7 +553,7 @@ func (c *ChannelArbitrator) Start(state *chanArbStartState) error { // StateWaitingFullResolution after we've transitioned from // StateContractClosed which can only be triggered by the local // or remote close trigger. This trigger is only fired when we - // receive a chain event from the chain watcher than the + // receive a chain event from the chain watcher that the // commitment has been confirmed on chain, and before we // advance our state step, we call InsertConfirmedCommitSet. err := c.relaunchResolvers(state.commitSet, triggerHeight) @@ -990,11 +990,18 @@ func (c *ChannelArbitrator) stateStep( label := labels.MakeLabel( labels.LabelTypeChannelClose, &c.cfg.ShortChanID, ) - if err := c.cfg.PublishTx(closeTx, label); err != nil { log.Errorf("ChannelArbitrator(%v): unable to broadcast "+ "close tx: %v", c.cfg.ChanPoint, err) - if err != lnwallet.ErrDoubleSpend { + + // This makes sure we don't fail at startup if the + // commitment transaction has too low fees to make it + // into mempool. The rebroadcaster makes sure this + // transaction is republished regularly until confirmed + // or replaced. + if !errors.Is(err, lnwallet.ErrDoubleSpend) && + !errors.Is(err, lnwallet.ErrMempoolFee) { + return StateError, closeTx, err } } diff --git a/contractcourt/utxonursery.go b/contractcourt/utxonursery.go index 3776a3546..a763679ed 100644 --- a/contractcourt/utxonursery.go +++ b/contractcourt/utxonursery.go @@ -3,6 +3,7 @@ package contractcourt import ( "bytes" "encoding/binary" + "errors" "fmt" "io" "sync" @@ -872,7 +873,13 @@ func (u *UtxoNursery) sweepCribOutput(classHeight uint32, baby *babyOutput) erro // confirmed before transitioning it to kindergarten. label := labels.MakeLabel(labels.LabelTypeSweepTransaction, nil) err := u.cfg.PublishTransaction(baby.timeoutTx, label) - if err != nil && err != lnwallet.ErrDoubleSpend { + + // In case the tx does not meet mempool fee requirements we continue + // because the tx is rebroadcasted in the background and there is + // nothing we can do to bump this transaction anyways. + if err != nil && !errors.Is(err, lnwallet.ErrDoubleSpend) && + !errors.Is(err, lnwallet.ErrMempoolFee) { + utxnLog.Errorf("Unable to broadcast baby tx: "+ "%v, %v", err, spew.Sdump(baby.timeoutTx)) return err