utxonursery: once all funds have been swept, mark chan as fully closed

This commit is contained in:
Olaoluwa Osuntokun 2017-05-04 16:05:57 -07:00
parent 3fd161d527
commit 36fe8a730e
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 10 additions and 0 deletions

View File

@ -740,6 +740,16 @@ func (u *utxoNursery) graduateKindergarten(blockHeight uint32) error {
if err != nil {
return err
}
// 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.
for _, closedChan := range kgtnOutputs {
err := u.db.MarkChanFullyClosed(&closedChan.originChanPoint)
if err != nil {
return err
}
}
}
// Using a re-org safety margin of 6-blocks, delete any outputs which