From 9d9d148262783b88b81a9c844d51b4bda6cb6702 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 4 Feb 2019 12:28:31 +0100 Subject: [PATCH] utxonursery: use baby expiry as height hint Previously we would use the best known height as height hint, which could lead to using a height hint above the actual block it confirms, hence losing track of the confirmation. --- utxonursery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utxonursery.go b/utxonursery.go index 26068558..36b97815 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -457,7 +457,7 @@ func (u *utxoNursery) IncubateOutputs(chanPoint wire.OutPoint, // it. This may happen if the caller raced a block to call this method. for _, babyOutput := range babyOutputs { if uint32(bestHeight) >= babyOutput.expiry { - err = u.sweepCribOutput(uint32(bestHeight), &babyOutput) + err = u.sweepCribOutput(babyOutput.expiry, &babyOutput) if err != nil { return err }