Changeset View
Changeset View
Standalone View
Standalone View
test/util/data/bitcoin-util-test.json
Show All 21 Lines | [ | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-json","-"], | "args": ["-json","-"], | ||||
"input": "blanktxv2.hex", | "input": "blanktxv2.hex", | ||||
"output_cmp": "blanktxv2.json", | "output_cmp": "blanktxv2.json", | ||||
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)" | "description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-create", "nversion=1foo"], | |||||
"return_code": 1, | |||||
"error_txt": "error: Invalid TX version requested", | |||||
"description": "Tests the check for invalid nversion value" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": ["-", "delin=1"], | "args": ["-", "delin=1"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-delin1-out.hex", | "output_cmp": "tt-delin1-out.hex", | ||||
"description": "Deletes a single input from a transaction" | "description": "Deletes a single input from a transaction" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-json", "-", "delin=1"], | "args": ["-json", "-", "delin=1"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-delin1-out.json", | "output_cmp": "tt-delin1-out.json", | ||||
"description": "Deletes a single input from a transaction (output in json)" | "description": "Deletes a single input from a transaction (output in json)" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-", "delin=31"], | "args": ["-", "delin=31"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"return_code": 1, | "return_code": 1, | ||||
"error_txt": "error: Invalid TX input index '31'", | "error_txt": "error: Invalid TX input index '31'", | ||||
"description": "Attempts to delete an input with a bad index from a transaction. Expected to fail." | "description": "Attempts to delete an input with a bad index from a transaction. Expected to fail." | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-", "delin=1foo"], | |||||
"input": "tx394b54bb.hex", | |||||
"return_code": 1, | |||||
"error_txt": "error: Invalid TX input index", | |||||
"description": "Tests the check for an invalid input index with delin" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": ["-", "delout=1"], | "args": ["-", "delout=1"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-delout1-out.hex", | "output_cmp": "tt-delout1-out.hex", | ||||
"description": "Deletes a single output from a transaction" | "description": "Deletes a single output from a transaction" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-json", "-", "delout=1"], | "args": ["-json", "-", "delout=1"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-delout1-out.json", | "output_cmp": "tt-delout1-out.json", | ||||
"description": "Deletes a single output from a transaction (output in json)" | "description": "Deletes a single output from a transaction (output in json)" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-", "delout=2"], | "args": ["-", "delout=2"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"return_code": 1, | "return_code": 1, | ||||
"error_txt": "error: Invalid TX output index '2'", | "error_txt": "error: Invalid TX output index '2'", | ||||
"description": "Attempts to delete an output with a bad index from a transaction. Expected to fail." | "description": "Attempts to delete an output with a bad index from a transaction. Expected to fail." | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-", "delout=1foo"], | |||||
"input": "tx394b54bb.hex", | |||||
"return_code": 1, | |||||
"error_txt": "error: Invalid TX output index", | |||||
"description": "Tests the check for an invalid output index with delout" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": ["-", "locktime=317000"], | "args": ["-", "locktime=317000"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-locktime317000-out.hex", | "output_cmp": "tt-locktime317000-out.hex", | ||||
"description": "Adds an nlocktime to a transaction" | "description": "Adds an nlocktime to a transaction" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-json", "-", "locktime=317000"], | "args": ["-json", "-", "locktime=317000"], | ||||
"input": "tx394b54bb.hex", | "input": "tx394b54bb.hex", | ||||
"output_cmp": "tt-locktime317000-out.json", | "output_cmp": "tt-locktime317000-out.json", | ||||
"description": "Adds an nlocktime to a transaction (output in json)" | "description": "Adds an nlocktime to a transaction (output in json)" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": ["-create", "locktime=317000foo"], | |||||
"return_code": 1, | |||||
"error_txt": "error: Invalid TX locktime requested", | |||||
"description": "Tests the check for invalid locktime value" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": | |||||
["-create", | |||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0x"], | |||||
"return_code": 1, | |||||
"error_txt": "error: invalid TX input vout", | |||||
"description": "Tests the check for an invalid vout value when adding an input" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": | "args": | ||||
["-create", | ["-create", | ||||
"outaddr=1"], | "outaddr=1"], | ||||
"return_code": 1, | "return_code": 1, | ||||
"error_txt": "error: TX output missing or too many separators", | "error_txt": "error: TX output missing or too many separators", | ||||
"description": "Malformed outaddr argument (no address specified). Expected to fail." | "description": "Malformed outaddr argument (no address specified). Expected to fail." | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | ["-create", | ||||
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]", | "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]", | ||||
"sign=ALL", | "sign=ALL", | ||||
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"], | "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"], | ||||
"output_cmp": "txcreatesignv2.hex", | "output_cmp": "txcreatesignv2.hex", | ||||
"description": "Creates a new transaction with a single input and a single output, and then signs the transaction" | "description": "Creates a new transaction with a single input and a single output, and then signs the transaction" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": | "args": | ||||
["-create", | |||||
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", | |||||
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]", | |||||
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":\"0foo\",\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]", | |||||
"sign=ALL", | |||||
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"], | |||||
"return_code": 1, | |||||
"error_txt": "error: prevtxs internal object typecheck fail", | |||||
"description": "Tests the check for invalid vout index in prevtxs for sign" | |||||
}, | |||||
{ "exec": "./bitcoin-tx", | |||||
"args": | |||||
["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"], | ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"], | ||||
"output_cmp": "txcreateoutpubkey1.hex", | "output_cmp": "txcreateoutpubkey1.hex", | ||||
"description": "Creates a new transaction with a single pay-to-pubkey output" | "description": "Creates a new transaction with a single pay-to-pubkey output" | ||||
}, | }, | ||||
{ "exec": "./bitcoin-tx", | { "exec": "./bitcoin-tx", | ||||
"args": | "args": | ||||
["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"], | ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"], | ||||
"output_cmp": "txcreateoutpubkey1.json", | "output_cmp": "txcreateoutpubkey1.json", | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |