From d725cfb8a962436039c64d6eb32a2cbe11e8c9aa Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Mon, 20 Jul 2020 21:51:44 +0200 Subject: [PATCH] dogecoin-tx: fix tests - explicitly specify v1 and v2 transactions due to 140cc1db - fix "exec: bitcoin-tx" misses --- src/test/data/bitcoin-util-test.json | 42 +++++++++++++++------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json index 901a6a1b9..99bfda37c 100644 --- a/src/test/data/bitcoin-util-test.json +++ b/src/test/data/bitcoin-util-test.json @@ -5,7 +5,7 @@ "description": "Creates a blank v1 transaction" }, { "exec": "./dogecoin-tx", - "args": ["-json","-create", "nversion=1"], + "args": ["-json", "-create", "nversion=1"], "output_cmp": "blanktxv1.json", "description": "Creates a blank v1 transaction (output in json)" }, @@ -13,15 +13,15 @@ "args": ["-"], "input": "blanktxv2.hex", "output_cmp": "blanktxv2.hex", - "description": "Creates a blank transaction when nothing is piped into dogecoin-tx" + "description": "Creates a blank v2 transaction when nothing is piped into dogecoin-tx" }, { "exec": "./dogecoin-tx", - "args": ["-json","-create"], + "args": ["-json","-create", "nversion=2"], "output_cmp": "blanktxv2.json", - "description": "Creates a blank transaction (output in json)" + "description": "Creates a blank v2 transaction (output in json)" }, { "exec": "./dogecoin-tx", - "args": ["-json","-"], + "args": ["-json", "-"], "input": "blanktxv2.hex", "output_cmp": "blanktxv2.json", "description": "Creates a blank transaction when nothing is piped into dogecoin-tx (output in json)" @@ -84,15 +84,15 @@ "error_txt": "error: TX output missing or too many separators", "description": "Malformed outaddr argument (no address specified). Expected to fail." }, - { "exec": "./bitcoin-tx", + { "exec": "./dogecoin-tx", "args": ["-create", - "outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"], + "outaddr=1:DTH54BW9S9Q1EPCCiseQCzEBgf6pTRZv3U:garbage"], "return_code": 1, "error_txt": "error: TX output missing or too many separators", "description": "Malformed outaddr argument (too many separators). Expected to fail." }, - { "exec": "./bitcoin-tx", + { "exec": "./dogecoin-tx", "args": ["-create", "outpubkey=0"], @@ -100,7 +100,7 @@ "error_txt": "error: TX output missing or too many separators", "description": "Malformed outpubkey argument (no pubkey specified). Expected to fail." }, - { "exec": "./bitcoin-tx", + { "exec": "./dogecoin-tx", "args": ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"], @@ -108,14 +108,15 @@ "error_txt": "error: TX output missing or too many separators", "description": "Malformed outpubkey argument (too many separators). Expected to fail." }, - { "exec": "./bitcoin-tx", + { "exec": "./dogecoin-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18", "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd", - "outaddr=4:DTH54BW9S9Q1EPCCiseQCzEBgf6pTRZv3U"], + "outaddr=4:DTH54BW9S9Q1EPCCiseQCzEBgf6pTRZv3U", + "nversion=2"], "output_cmp": "txcreate1.hex", "description": "Creates a new transaction with three inputs and two outputs" }, @@ -127,17 +128,18 @@ "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18", "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd", - "outaddr=4:DTH54BW9S9Q1EPCCiseQCzEBgf6pTRZv3U"], + "outaddr=4:DTH54BW9S9Q1EPCCiseQCzEBgf6pTRZv3U", + "nversion=2"], "output_cmp": "txcreate1.json", "description": "Creates a new transaction with three inputs and two outputs (output in json)" }, { "exec": "./dogecoin-tx", - "args": ["-create", "outscript=0:"], + "args": ["-create", "outscript=0:", "nversion=2"], "output_cmp": "txcreate2.hex", "description": "Creates a new transaction with a single empty output script" }, { "exec": "./dogecoin-tx", - "args": ["-json", "-create", "outscript=0:"], + "args": ["-json", "-create", "outscript=0:", "nversion=2"], "output_cmp": "txcreate2.json", "description": "Creates a new transaction with a single empty output script (output in json)" }, @@ -216,7 +218,7 @@ }, { "exec": "./dogecoin-tx", "args": - ["-create", + ["-create", "nversion=2", "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", "set=privatekeys:[\"6J8csdv3eDrnJcpSEb4shfjMh2JTiG9MKzC1Yfge4Y4GyUsjdM6\"]", "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]", @@ -281,7 +283,7 @@ }, { "exec": "./dogecoin-tx", "args": - ["-create", + ["-create", "nversion=2", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd", "outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], @@ -300,7 +302,7 @@ }, { "exec": "./dogecoin-tx", "args": - ["-create", + ["-create", "nversion=2", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd", "outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], @@ -310,7 +312,7 @@ { "exec": "./dogecoin-tx", "args": ["-json", - "-create", + "-create", "nversion=2", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd", "outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], @@ -319,7 +321,7 @@ }, { "exec": "./dogecoin-tx", "args": - ["-create", + ["-create", "nversion=2", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd"], "output_cmp": "txcreatedata_seq0.hex", @@ -328,7 +330,7 @@ { "exec": "./dogecoin-tx", "args": ["-json", - "-create", + "-create", "nversion=2", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293", "outaddr=0.18:D82zqZA4KqaTPmsGegJ1ACoTXiSJ21NcZd"], "output_cmp": "txcreatedata_seq0.json",