From 36fe8a730ef912b7380ea8015a2734227c744cbb Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 4 May 2017 16:05:57 -0700 Subject: [PATCH] utxonursery: once all funds have been swept, mark chan as fully closed --- utxonursery.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/utxonursery.go b/utxonursery.go index f16a11ad..eeb3c68b 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -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