mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-09 20:49:08 +02:00
utxonursery: don't mark channel as fully closed in closeAndRemoveIfMature
The ChannelArbitrator for this channel will do this, so we don’t need to do it at this point any longer.
This commit is contained in:
parent
6568330355
commit
eeb6ab0b17
@ -1393,7 +1393,6 @@ func (c *contractMaturityReport) AddRecoveredHtlc(kid *kidOutput) {
|
||||
maturityRequirement: kid.BlocksToMaturity(),
|
||||
maturityHeight: kid.ConfHeight() + kid.BlocksToMaturity(),
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// closeAndRemoveIfMature removes a particular channel from the channel index
|
||||
@ -1415,18 +1414,6 @@ func (u *utxoNursery) closeAndRemoveIfMature(chanPoint *wire.OutPoint) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Now that the sweeping transaction has been broadcast, for
|
||||
// each of the immature outputs, we'll mark them as being fully
|
||||
// closed within the database.
|
||||
err = u.cfg.DB.MarkChanFullyClosed(chanPoint)
|
||||
if err != nil {
|
||||
utxnLog.Errorf("Unable to mark channel=%v as fully "+
|
||||
"closed: %v", chanPoint, err)
|
||||
return err
|
||||
}
|
||||
|
||||
utxnLog.Infof("Marked Channel(%s) as fully closed", chanPoint)
|
||||
|
||||
// Now that the channel is fully closed, we remove the channel from the
|
||||
// nursery store here. This preserves the invariant that we never remove
|
||||
// a channel unless it is mature, as this is the only place the utxo
|
||||
|
Loading…
x
Reference in New Issue
Block a user