mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
contractcourt: make sure ChainArbitrator
is started properly
We should not fail to start the node if a republish attempt failed for a channel's closing tx. Instead, we log an error to continue the startup and let other channels continue their operations.
This commit is contained in:
parent
fb1c6ea6a7
commit
a6a8415a26
@ -548,9 +548,10 @@ func (c *ChainArbitrator) Start() error {
|
||||
c.activeChannels[chanPoint] = channelArb
|
||||
|
||||
// Republish any closing transactions for this channel.
|
||||
err = c.publishClosingTxs(channel)
|
||||
err = c.republishClosingTxs(channel)
|
||||
if err != nil {
|
||||
return err
|
||||
log.Errorf("Failed to republish closing txs for "+
|
||||
"channel %v", chanPoint)
|
||||
}
|
||||
}
|
||||
|
||||
@ -825,10 +826,10 @@ func (c *ChainArbitrator) dispatchBlocks(
|
||||
}
|
||||
}
|
||||
|
||||
// publishClosingTxs will load any stored cooperative or unilater closing
|
||||
// republishClosingTxs will load any stored cooperative or unilateral closing
|
||||
// transactions and republish them. This helps ensure propagation of the
|
||||
// transactions in the event that prior publications failed.
|
||||
func (c *ChainArbitrator) publishClosingTxs(
|
||||
func (c *ChainArbitrator) republishClosingTxs(
|
||||
channel *channeldb.OpenChannel) error {
|
||||
|
||||
// If the channel has had its unilateral close broadcasted already,
|
||||
|
Loading…
Reference in New Issue
Block a user