From 3a12b5867f1079c2125b8b6d2ff87c94d076235f Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 16 Sep 2020 10:42:09 +0200 Subject: [PATCH] txnotifier test: use Cancel() directly --- chainntnfs/txnotifier_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chainntnfs/txnotifier_test.go b/chainntnfs/txnotifier_test.go index b2262d4a..b474a3f9 100644 --- a/chainntnfs/txnotifier_test.go +++ b/chainntnfs/txnotifier_test.go @@ -1159,7 +1159,6 @@ func TestTxNotifierCancelConf(t *testing.T) { if err != nil { t.Fatalf("unable to register spend ntfn: %v", err) } - cancelConfRequest := ntfn2.HistoricalDispatch.ConfRequest // Extend the chain with a block that will confirm both transactions. // This will queue confirmation notifications to dispatch once their @@ -1175,7 +1174,7 @@ func TestTxNotifierCancelConf(t *testing.T) { } // Cancel the second notification before connecting the block. - n.CancelConf(cancelConfRequest, 2) + ntfn2.Event.Cancel() err = n.ConnectTip(block.Hash(), startingHeight+1, block.Transactions()) if err != nil { @@ -1184,7 +1183,7 @@ func TestTxNotifierCancelConf(t *testing.T) { // Cancel the third notification before notifying to ensure its queued // confirmation notification gets removed as well. - n.CancelConf(cancelConfRequest, 3) + ntfn3.Event.Cancel() if err := n.NotifyHeight(startingHeight + 1); err != nil { t.Fatalf("unable to dispatch notifications: %v", err)