153dca5c1e
This updates the data driven transaction script tests to use the most recent format and test data as implemented by Core so the test data can more easily be updated and help prove cross-compatibility correctness. In particular, the new format combines the previously separate valid and invalid test data files into a single file and adds a field for the expected result. This is a nice improvement since it means tests can now ensure script failures are due to a specific expected reason as opposed to only generically detecting failure as the previous format required. The btcd script engine typically returns more fine grained errors than the test data expects, so the test adapter handles this by allowing expected errors in the test data to be mapped to multiple txscript errors. It should also be noted that the tests related to segwit have been stripped from the data since the segwit PR has not landed in master yet, however the test adapter does recognize the new ability for optional segwit data to be supplied, though it will need to properly construct the transaction using that data when the time comes. |
||
---|---|---|
.. | ||
LICENSE | ||
script_tests.json | ||
sighash.json | ||
tx_invalid.json | ||
tx_valid.json |