Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: 153dca5c1e4b5d1ea1523592495e5bedfa503391
      
https://github.com/btcsuite/btcd/commit/153dca5c1e4b5d1ea1523592495e5bedfa503391
  Author: Dave Collins <da...@conformal.com>
  Date:   2017-01-12 (Thu, 12 Jan 2017)

  Changed paths:
    R txscript/data/script_invalid.json
    A txscript/data/script_tests.json
    R txscript/data/script_valid.json
    M txscript/reference_test.go

  Log Message:
  -----------
  txscript: Convert reference tests to new format.

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.


Reply via email to