Merge pull request #2584 from halseth/utxonursery-baby-expiry-heighthint

utxonursery: use baby expiry as height hint
This commit is contained in:
Olaoluwa Osuntokun 2019-02-04 17:21:28 -08:00 committed by GitHub
commit 27c7ce91f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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