utxonursery: update inner loop to use new ChainNotifier API

Within the inner loop of the utxoNursery when waiting for a new
sweepable transaction to be confirmed, we now use the new ChainNotifier
API for ConfirmationEvent’s which exposes additional details as to
exactly where in the chain the transaction was ultimately confirmed.
This commit is contained in:
Olaoluwa Osuntokun 2016-12-24 18:44:10 -06:00
parent a09db60a1f
commit 702f214972
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -137,17 +137,18 @@ out:
// the output back to the incubator once the
// source txn has been confirmed.
go func() {
confHeight, ok := <-confChan.Confirmed
confDetails, ok := <-confChan.Confirmed
if !ok {
utxnLog.Errorf("notification chan "+
"closed, can't advance output %v", outpoint)
return
}
confHeight := uint32(confDetails.BlockHeight)
utxnLog.Infof("Outpoint %v confirmed in "+
"block %v moving to mid-stage",
outpoint, confHeight)
immatureUtxo.confHeight = uint32(confHeight)
immatureUtxo.confHeight = confHeight
midStageOutputs <- immatureUtxo
}()
}