summaryrefslogtreecommitdiff
path: root/bip-0158/gentestvectors.go
diff options
context:
space:
mode:
authorOlaoluwa Osuntokun <laolu32@gmail.com>2019-02-12 18:31:08 -0800
committerOlaoluwa Osuntokun <laolu32@gmail.com>2019-02-12 18:31:12 -0800
commitdd3948b4742eaad13872a85691347dc77cce09f0 (patch)
tree9152ac640bc7b274419685a06ebdba4ba32767b7 /bip-0158/gentestvectors.go
parent954df0d10728dd704fa4b378255ae23e6a5952a0 (diff)
downloadbips-dd3948b4742eaad13872a85691347dc77cce09f0.tar.xz
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.
Diffstat (limited to 'bip-0158/gentestvectors.go')
-rw-r--r--bip-0158/gentestvectors.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bip-0158/gentestvectors.go b/bip-0158/gentestvectors.go
index 011bb7a..3435eb3 100644
--- a/bip-0158/gentestvectors.go
+++ b/bip-0158/gentestvectors.go
@@ -33,11 +33,13 @@ var (
{0, "Genesis block"},
{2, ""},
{3, ""},
+ {15007, "Tx has non-standard OP_RETURN output followed by opcodes"},
{49291, "Tx pays to empty output script"},
{180480, "Tx spends from empty output script"},
{926485, "Duplicate pushdata 913bcc2be49cb534c20474c4dee1e9c4c317e7eb"},
{987876, "Coinbase tx has unparseable output script"},
{1263442, "Includes witness data"},
+ {1414221, "Empty data"},
}
defaultBtcdDir = btcutil.AppDataDir("btcd", false)