From dd3948b4742eaad13872a85691347dc77cce09f0 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 12 Feb 2019 18:31:08 -0800 Subject: BIP-0158: add test cases for OP_RETURN with op codes, empty filter In this commit, we add a new test case for a filter built from a block that has a transaction with an OP_RETURN which isn't followed by only push data items. The prior implementation for btcd (which was used to generated these test vectors), had a stricter check which caused it to add extra items to the filter. We also add a case of a block that has a single coinbase transaction, with that transaction having only an OP_RETURN output. As a result, that filter will be "empty", and is signalled by by a single zero (0x00) byte. In order to make building the code that makes the test vectors reproducible, we've added go.mod and go.sum files as well. --- bip-0158/go.mod | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bip-0158/go.mod (limited to 'bip-0158/go.mod') diff --git a/bip-0158/go.mod b/bip-0158/go.mod new file mode 100644 index 0000000..0e9bd6e --- /dev/null +++ b/bip-0158/go.mod @@ -0,0 +1,7 @@ +module github.com/bitcoin/bips/bip-0158 + +require ( + github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d + github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803 + github.com/davecgh/go-spew v1.1.1 +) -- cgit v1.2.3