From 55d6586a675f71e8e56e8f2eac8b4757fa9478ff Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 30 May 2018 22:17:17 -0700 Subject: [PATCH] utxonursery: update to register for confs using pkScripts --- utxonursery.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/utxonursery.go b/utxonursery.go index 3aac57ed..ec2424d3 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -1145,7 +1145,9 @@ func (u *utxoNursery) registerSweepConf(finalTx *wire.MsgTx, finalTxID := finalTx.TxHash() confChan, err := u.cfg.Notifier.RegisterConfirmationsNtfn( - &finalTxID, u.cfg.ConfDepth, heightHint) + &finalTxID, finalTx.TxOut[0].PkScript, u.cfg.ConfDepth, + heightHint, + ) if err != nil { utxnLog.Errorf("unable to register notification for "+ "sweep confirmation: %v", finalTxID) @@ -1251,7 +1253,9 @@ func (u *utxoNursery) registerTimeoutConf(baby *babyOutput, heightHint uint32) e // Register for the confirmation of presigned htlc txn. confChan, err := u.cfg.Notifier.RegisterConfirmationsNtfn( - &birthTxID, u.cfg.ConfDepth, heightHint) + &birthTxID, baby.timeoutTx.TxOut[0].PkScript, u.cfg.ConfDepth, + heightHint, + ) if err != nil { return err } @@ -1316,8 +1320,10 @@ func (u *utxoNursery) registerPreschoolConf(kid *kidOutput, heightHint uint32) e // de-duplicate // * need to do above? - confChan, err := u.cfg.Notifier.RegisterConfirmationsNtfn(&txID, - u.cfg.ConfDepth, heightHint) + pkScript := kid.signDesc.Output.PkScript + confChan, err := u.cfg.Notifier.RegisterConfirmationsNtfn( + &txID, pkScript, u.cfg.ConfDepth, heightHint, + ) if err != nil { return err }