Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add bitcoin-tx JSON tests #8829
This was referenced
Sep 28, 2016
Sep 29, 2016
1 check passed
Interesting. The txcreate2 test is attempting to create a transaction with a single pay-to-script output for zero satoshi. When outputting as json, bitcoin-tx returns the empty string. When outputting as hex, it returns 01000000000100000000000000000000000000, ie:
I think that's garbage and bitcoin-tx should reject any attempt to add an output with zero satoshi. I'll open a PR to fix that.
Interestingly, bitcoin-tx does output a json object if I try to create a zero-value transaction output to a non-empty script:
txcreate2 is also the only test case that tests creating a pay-to-script, so we should add a new test case that tests adding a valid pay-to-script output.