From 996307736e3f4a69098d97ab5d1688175cd2220c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 28 May 2018 20:20:04 -0700 Subject: [PATCH] gcs/builder: update builder tests to use addr script directly --- gcs/builder/builder_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gcs/builder/builder_test.go b/gcs/builder/builder_test.go index 35c826e..1bfb643 100644 --- a/gcs/builder/builder_test.go +++ b/gcs/builder/builder_test.go @@ -254,17 +254,12 @@ func BuilderTest(b *builder.GCSBuilder, hash *chainhash.Hash, p uint8, } // Add a script, build a filter, and test matches - b.AddScript(addrBytes) + b.AddEntry(addrBytes) f, err = b.Build() if err != nil { t.Fatalf("Filter build failed: %s", err.Error()) } - pushedData, err := txscript.PushedData(addrBytes) - if err != nil { - t.Fatalf("Couldn't extract pushed data from addrBytes script: %s", - err.Error()) - } - match, err = f.MatchAny(key, pushedData) + match, err = f.MatchAny(key, [][]byte{addrBytes}) if err != nil { t.Fatalf("Filter match any failed: %s", err) }