gcs/builder: update builder tests to use addr script directly
This commit is contained in:
parent
3b3422dc54
commit
996307736e
1 changed files with 2 additions and 7 deletions
|
@ -254,17 +254,12 @@ func BuilderTest(b *builder.GCSBuilder, hash *chainhash.Hash, p uint8,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a script, build a filter, and test matches
|
// Add a script, build a filter, and test matches
|
||||||
b.AddScript(addrBytes)
|
b.AddEntry(addrBytes)
|
||||||
f, err = b.Build()
|
f, err = b.Build()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Filter build failed: %s", err.Error())
|
t.Fatalf("Filter build failed: %s", err.Error())
|
||||||
}
|
}
|
||||||
pushedData, err := txscript.PushedData(addrBytes)
|
match, err = f.MatchAny(key, [][]byte{addrBytes})
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Couldn't extract pushed data from addrBytes script: %s",
|
|
||||||
err.Error())
|
|
||||||
}
|
|
||||||
match, err = f.MatchAny(key, pushedData)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Filter match any failed: %s", err)
|
t.Fatalf("Filter match any failed: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue