From 1a5b1d97922ead8a31ba37e90cd99799a8595683 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 17 Jul 2018 19:04:31 -0700 Subject: [PATCH] chainntnfs: update interface tests to pass the prev script into RegisterSpendNtfn --- chainntnfs/interface_test.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/chainntnfs/interface_test.go b/chainntnfs/interface_test.go index e4fe3fbdb..5bba96812 100644 --- a/chainntnfs/interface_test.go +++ b/chainntnfs/interface_test.go @@ -420,8 +420,9 @@ func testSpendNotification(miner *rpctest.Harness, const numClients = 5 spendClients := make([]*chainntnfs.SpendEvent, numClients) for i := 0; i < numClients; i++ { - spentIntent, err := notifier.RegisterSpendNtfn(outpoint, - uint32(currentHeight)) + spentIntent, err := notifier.RegisterSpendNtfn( + outpoint, pkScript, uint32(currentHeight), + ) if err != nil { t.Fatalf("unable to register for spend ntfn: %v", err) } @@ -471,8 +472,9 @@ func testSpendNotification(miner *rpctest.Harness, // Make sure registering a client after the tx is in the mempool still // doesn't trigger a notification. - spentIntent, err := notifier.RegisterSpendNtfn(outpoint, - uint32(currentHeight)) + spentIntent, err := notifier.RegisterSpendNtfn( + outpoint, pkScript, uint32(currentHeight), + ) if err != nil { t.Fatalf("unable to register for spend ntfn: %v", err) } @@ -918,8 +920,9 @@ func testSpendBeforeNtfnRegistration(miner *rpctest.Harness, const numClients = 2 spendClients := make([]*chainntnfs.SpendEvent, numClients) for i := 0; i < numClients; i++ { - spentIntent, err := notifier.RegisterSpendNtfn(outpoint, - uint32(currentHeight)) + spentIntent, err := notifier.RegisterSpendNtfn( + outpoint, pkScript, uint32(currentHeight), + ) if err != nil { t.Fatalf("unable to register for spend ntfn: %v", err) @@ -998,8 +1001,9 @@ func testCancelSpendNtfn(node *rpctest.Harness, const numClients = 2 spendClients := make([]*chainntnfs.SpendEvent, numClients) for i := 0; i < numClients; i++ { - spentIntent, err := notifier.RegisterSpendNtfn(outpoint, - uint32(currentHeight)) + spentIntent, err := notifier.RegisterSpendNtfn( + outpoint, pkScript, uint32(currentHeight), + ) if err != nil { t.Fatalf("unable to register for spend ntfn: %v", err) }