Skip to content

Commit d7798ee

Browse files
committed
move test files to src/test/data
1 parent c0f1785 commit d7798ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1295
-106
lines changed

src/test/data/blanktx.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
01000000000000000000

src/test/data/blanktxv1.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
01000000000000000000

src/test/data/blanktxv1.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"txid": "d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43",
3+
"version": 1,
4+
"locktime": 0,
5+
"vin": [
6+
],
7+
"vout": [
8+
],
9+
"hex": "01000000000000000000"
10+
}

src/test/data/blanktxv2.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
02000000000000000000

src/test/data/blanktxv2.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"txid": "4ebd325a4b394cff8c57e8317ccf5a8d0e2bdf1b8526f8aad6c8e43d8240621a",
3+
"version": 2,
4+
"locktime": 0,
5+
"vin": [
6+
],
7+
"vout": [
8+
],
9+
"hex": "02000000000000000000"
10+
}
Lines changed: 24 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
{ "exec": "./syscoin-tx",
8888
"args":
8989
["-create",
90-
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
90+
"outaddr=1:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw:garbage"],
9191
"return_code": 1,
9292
"error_txt": "error: TX output missing or too many separators",
9393
"description": "Malformed outaddr argument (too many separators). Expected to fail."
@@ -103,7 +103,7 @@
103103
{ "exec": "./syscoin-tx",
104104
"args":
105105
["-create",
106-
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
106+
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:S:non53nse"],
107107
"return_code": 1,
108108
"error_txt": "error: TX output missing or too many separators",
109109
"description": "Malformed outpubkey argument (too many separators). Expected to fail."
@@ -114,8 +114,8 @@
114114
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
115115
"in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
116116
"in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
117-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
118-
"outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
117+
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw",
118+
"outaddr=4:XxppMBDQ6SiJrKcBrAy4WkkNdrxDBfzFdZ"],
119119
"output_cmp": "txcreate1.hex",
120120
"description": "Creates a new transaction with three inputs and two outputs"
121121
},
@@ -126,8 +126,8 @@
126126
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
127127
"in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
128128
"in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
129-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
130-
"outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
129+
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw",
130+
"outaddr=4:XxppMBDQ6SiJrKcBrAy4WkkNdrxDBfzFdZ"],
131131
"output_cmp": "txcreate1.json",
132132
"description": "Creates a new transaction with three inputs and two outputs (output in json)"
133133
},
@@ -141,16 +141,6 @@
141141
"output_cmp": "txcreate2.json",
142142
"description": "Creates a new transaction with a single empty output script (output in json)"
143143
},
144-
{ "exec": "./syscoin-tx",
145-
"args": ["02000000000100000000000000000000000000"],
146-
"output_cmp": "txcreate2.hex",
147-
"description": "Parses a transaction with no inputs and a single output script"
148-
},
149-
{ "exec": "./syscoin-tx",
150-
"args": ["-json", "02000000000100000000000000000000000000"],
151-
"output_cmp": "txcreate2.json",
152-
"description": "Parses a transaction with no inputs and a single output script (output in json)"
153-
},
154144
{ "exec": "./syscoin-tx",
155145
"args": ["-create", "outscript=0:OP_DROP", "nversion=1"],
156146
"output_cmp": "txcreatescript1.hex",
@@ -172,33 +162,23 @@
172162
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
173163
},
174164
{ "exec": "./syscoin-tx",
175-
"args": ["-create", "outscript=0:OP_DROP:W", "nversion=1"],
176-
"output_cmp": "txcreatescript3.hex",
177-
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
178-
},
179-
{ "exec": "./syscoin-tx",
180-
"args": ["-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
181-
"output_cmp": "txcreatescript3.json",
182-
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
183-
},
184-
{ "exec": "./syscoin-tx",
185-
"args": ["-create", "outscript=0:OP_DROP:WS", "nversion=1"],
186-
"output_cmp": "txcreatescript4.hex",
187-
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
165+
"args": ["02000000000100000000000000000000000000"],
166+
"output_cmp": "txcreate2.hex",
167+
"description": "Parses a transation with no inputs and a single output script"
188168
},
189169
{ "exec": "./syscoin-tx",
190-
"args": ["-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
191-
"output_cmp": "txcreatescript4.json",
192-
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
170+
"args": ["-json", "02000000000100000000000000000000000000"],
171+
"output_cmp": "txcreate2.json",
172+
"description": "Parses a transation with no inputs and a single output script (output in json)"
193173
},
194174
{ "exec": "./syscoin-tx",
195175
"args":
196176
["-create", "nversion=1",
197177
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
198-
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
178+
"set=privatekeys:[\"7qYrzJZWqnyCWMYswFcqaRJypGdVceudXPSxmZKsngN7fyo7aAV\"]",
199179
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
200180
"sign=ALL",
201-
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
181+
"outaddr=0.001:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk"],
202182
"output_cmp": "txcreatesignv1.hex",
203183
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
204184
},
@@ -207,21 +187,21 @@
207187
["-json",
208188
"-create", "nversion=1",
209189
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
210-
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
190+
"set=privatekeys:[\"7qYrzJZWqnyCWMYswFcqaRJypGdVceudXPSxmZKsngN7fyo7aAV\"]",
211191
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
212192
"sign=ALL",
213-
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
193+
"outaddr=0.001:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk"],
214194
"output_cmp": "txcreatesignv1.json",
215195
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
216196
},
217197
{ "exec": "./syscoin-tx",
218198
"args":
219199
["-create",
220200
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
221-
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
201+
"set=privatekeys:[\"7qYrzJZWqnyCWMYswFcqaRJypGdVceudXPSxmZKsngN7fyo7aAV\"]",
222202
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
223203
"sign=ALL",
224-
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
204+
"outaddr=0.001:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk"],
225205
"output_cmp": "txcreatesignv2.hex",
226206
"description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
227207
},
@@ -237,37 +217,6 @@
237217
"output_cmp": "txcreateoutpubkey1.json",
238218
"description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
239219
},
240-
{ "exec": "./syscoin-tx",
241-
"args":
242-
["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
243-
"output_cmp": "txcreateoutpubkey2.hex",
244-
"description": "Creates a new transaction with a single pay-to-witness-pubkey output"
245-
},
246-
{ "exec": "./syscoin-tx",
247-
"args":
248-
["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
249-
"output_cmp": "txcreateoutpubkey2.json",
250-
"description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
251-
},
252-
{ "exec": "./syscoin-tx",
253-
"args":
254-
["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
255-
"output_cmp": "txcreateoutpubkey3.hex",
256-
"description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
257-
},
258-
{ "exec": "./syscoin-tx",
259-
"args":
260-
["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
261-
"output_cmp": "txcreateoutpubkey3.json",
262-
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
263-
},
264-
{ "exec": "./syscoin-tx",
265-
"args":
266-
["-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],
267-
"return_code": 1,
268-
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
269-
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
270-
},
271220
{ "exec": "./syscoin-tx",
272221
"args":
273222
["-create",
@@ -290,7 +239,7 @@
290239
"args":
291240
["-create",
292241
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
293-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
242+
"outaddr=0.18:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk",
294243
"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
295244
"output_cmp": "txcreatedata1.hex",
296245
"description": "Creates a new transaction with one input, one address output and one data output"
@@ -300,7 +249,7 @@
300249
["-json",
301250
"-create", "nversion=1",
302251
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
303-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
252+
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw",
304253
"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
305254
"output_cmp": "txcreatedata1.json",
306255
"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
@@ -309,7 +258,7 @@
309258
"args":
310259
["-create",
311260
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
312-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
261+
"outaddr=0.18:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk",
313262
"outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
314263
"output_cmp": "txcreatedata2.hex",
315264
"description": "Creates a new transaction with one input, one address output and one data (zero value) output"
@@ -319,7 +268,7 @@
319268
["-json",
320269
"-create",
321270
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
322-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
271+
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw",
323272
"outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
324273
"output_cmp": "txcreatedata2.json",
325274
"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
@@ -328,7 +277,7 @@
328277
"args":
329278
["-create",
330279
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
331-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],
280+
"outaddr=0.18:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk"],
332281
"output_cmp": "txcreatedata_seq0.hex",
333282
"description": "Creates a new transaction with one input with sequence number and one address output"
334283
},
@@ -337,7 +286,7 @@
337286
["-json",
338287
"-create",
339288
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
340-
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],
289+
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw"],
341290
"output_cmp": "txcreatedata_seq0.json",
342291
"description": "Creates a new transaction with one input with sequence number and one address output (output in json)"
343292
},
@@ -375,36 +324,5 @@
375324
"args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
376325
"output_cmp": "txcreatemultisig2.json",
377326
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
378-
},
379-
{ "exec": "./syscoin-tx",
380-
"args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
381-
"output_cmp": "txcreatemultisig3.hex",
382-
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
383-
},
384-
{ "exec": "./syscoin-tx",
385-
"args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
386-
"output_cmp": "txcreatemultisig3.json",
387-
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
388-
},
389-
{ "exec": "./syscoin-tx",
390-
"args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
391-
"output_cmp": "txcreatemultisig4.hex",
392-
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
393-
},
394-
{ "exec": "./syscoin-tx",
395-
"args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
396-
"output_cmp": "txcreatemultisig4.json",
397-
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
398-
},
399-
{ "exec": "./syscoin-tx",
400-
"args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:S"],
401-
"output_cmp": "txcreatemultisig5.json",
402-
"description": "Uncompressed pubkeys should work just fine for non-witness outputs"
403-
},
404-
{ "exec": "./syscoin-tx",
405-
"args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS"],
406-
"return_code": 1,
407-
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
408-
"description": "Ensure adding witness outputs with uncompressed pubkeys fails"
409327
}
410328
]

0 commit comments

Comments
 (0)