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:
Olaoluwa Osuntokun 2018-01-16 20:43:24 -08:00
parent 6568330355
commit eeb6ab0b17
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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