bitcoinj-cash / bitcoinj

A library for working with Bitcoin
http://bitcoinj.cash
Apache License 2.0
64 stars 35 forks source link

Adding the json script tests from ABC #53

Open Danconnolly opened 6 years ago

Danconnolly commented 6 years ago

This pull request incorporates the standard script unit tests from the script_tests.json file. These unit tests are used by the major node implementations. Care has been taken to avoid modifying the script_tests.json file (with the exception of attribution), so that it can be re-imported in the future as new tests are added.

The tests have shown several deficiencies in the BitcoinJ Script implementation. I have corrected enough to get the basic tests working but many are still not working. Tests which cover features that have not been implemented in bitcoinj-cash yet are ignored. See the TODO notes in ScriptDataDrivenTest.java.

These broken tests need to be addressed at some point. I have run out of time to devote on this right now and am posting it here as a "work in progress".

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 76.956% when pulling ca6b9a675cb4e8e1f15baef936c1cffc9469ff27 on nchain-research:jsonscripttests into 5765668181dca758281bfe747e0cbb59e33fe4fa on bitcoinj-cash:cash-0.14.

Danconnolly commented 6 years ago

rebased off cash-0.14 branch

HashEngineering commented 6 years ago

one of the commits #f5c8eca is for Java 1.6 compatibility, but we had another pull request that was approved for Java 1.7.

Danconnolly commented 6 years ago

Good point, thanks.