diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-21 15:32:11 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-21 15:33:19 +0100 |
commit | 210891143ba000708989aa64903c8d3c383e04e1 (patch) | |
tree | c2f09107402ee69b1fe777a2e28aeba3a9bacc60 | |
parent | b9a87b459d2536e572b3a0836f8affb2cc894330 (diff) | |
parent | 7451cf59cd7b3a917fe7e4c7210d43b2f5adaad3 (diff) | |
download | bitcoin-210891143ba000708989aa64903c8d3c383e04e1.tar.xz |
Merge #8837: allow bitcoin-tx to parse partial transactions
7451cf5 Allow bitcoin-tx to parse partial transactions (jnewbery)
-rw-r--r-- | src/bitcoin-tx.cpp | 2 | ||||
-rw-r--r-- | src/test/data/bitcoin-util-test.json | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 6c66efcc9c..6d17bc392f 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -638,7 +638,7 @@ static int CommandLineRawTx(int argc, char* argv[]) if (strHexTx == "-") // "-" implies standard input strHexTx = readStdin(); - if (!DecodeHexTx(txDecodeTmp, strHexTx)) + if (!DecodeHexTx(txDecodeTmp, strHexTx, true)) throw runtime_error("invalid transaction encoding"); startArg = 2; diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json index de95044597..98be75919b 100644 --- a/src/test/data/bitcoin-util-test.json +++ b/src/test/data/bitcoin-util-test.json @@ -103,6 +103,16 @@ "description": "Creates a new transaction with a single empty output script (output in json)" }, { "exec": "./bitcoin-tx", + "args": ["01000000000100000000000000000000000000"], + "output_cmp": "txcreate2.hex", + "description": "Parses a transation with no inputs and a single output script" + }, + { "exec": "./bitcoin-tx", + "args": ["-json", "01000000000100000000000000000000000000"], + "output_cmp": "txcreate2.json", + "description": "Parses a transation with no inputs and a single output script (output in json)" + }, + { "exec": "./bitcoin-tx", "args": ["-create", "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", |