aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [qa] script_tests: witness tests can specify tx amountSuhas Daftuar2016-06-221-23/+45
| | | | Add tests that witness signatures cover value
* [qa] p2p segwit testsSuhas Daftuar2016-06-221-3/+44
| | | | | | | | | | | | mininode now supports witness transactions/blocks, blocktools has a helper for adding witness commitments to blocks, and script has a function to calculate hashes for signature under sigversion 1, used by segwit. Py3 conversion by Marco Falke Test to make sure upgraded nodes don't ask for non-wit blocks by Gregory Sanders.
* [qa] Autogeneration support for witness in script_testsPieter Wuille2016-06-221-10/+95
|
* [qa] Add segwit support to script_testsPieter Wuille2016-06-221-18/+35
| | | | Contains fix by Johnson Lau.
* BIP143: Signing logicPieter Wuille2016-06-221-50/+50
|
* [libconsensus] Script verification API with amountsThomas Kerin2016-06-221-1/+6
| | | | | | | | | | script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set Rename internal method + make it static trim bitcoinconsensus_ prefix Add SERIALIZE_TRANSACTION_WITNESS flag
* BIP143: Verification logicPieter Wuille2016-06-221-28/+29
| | | | Includes simplifications by Eric Lombrozo.
* Refactor script validation to observe amountsPieter Wuille2016-06-221-14/+15
| | | | This is a preparation for BIP143 support.
* BIP141: Witness programPieter Wuille2016-06-221-16/+20
|
* Adding P2SH(p2pkh) script test caseChris Stewart2016-05-301-1/+4
| | | | | | | | | | | | Fixing formatting Adding test case into automatically generated test case set Clean up commits removing extra whitespace from eol Removing extra whitespace on macro line
* Unit test for CScript::FindAndDeleteGavin Andresen2016-04-191-0/+117
|
* Merge script_valid and script_invalid testsPieter Wuille2016-04-051-324/+277
|
* Get rid of expect in script_tests as it's implied by scripterrorPieter Wuille2016-04-051-8/+9
|
* Make script_error a mandatory 4th field for script_testsPieter Wuille2016-04-051-9/+6
|
* Fix some misconstructed testsPieter Wuille2016-04-051-4/+10
| | | | | | | | They claimed to be testing P2SH scripts with non-push scriptSigs, but 1) they were not enabling P2SH 2) they have push-only scriptSigs Fix this, and add a few more related cases.
* Fix JSON pretty printing in script_testsPieter Wuille2016-04-051-4/+16
|
* Merge #7517: test: script_error checking in script_invalid testsWladimir J. van der Laan2016-03-141-57/+126
|\ | | | | | | | | | | 0ecb340 test: Script_error checking in script_invalid tests (Wladimir J. van der Laan) 2317ad7 test: Re-introduce JSON pretty printing in test builder (Wladimir J. van der Laan) b0ff857 test: Move non-generated script_invalid test to the correct place (Wladimir J. van der Laan)
| * test: Script_error checking in script_invalid testsWladimir J. van der Laan2016-02-111-54/+123
| | | | | | | | | | | | | | | | | | | | Check the returned script_error. Add expected script_error for generated as well as custom tests. The specific error is not part of consensus, however it could avoid unclear reporting issues such as #6862 in the future. Fixes #7513.
| * test: Re-introduce JSON pretty printing in test builderWladimir J. van der Laan2016-02-111-3/+3
| |
* | Merge #7184: Implement SequenceLocks functions for BIP 68Wladimir J. van der Laan2016-02-121-2/+2
|\ \ | |/ |/| | | | | | | | | b043c4b fix sdaftuar's nits again (Alex Morcos) a51c79b Bug fix to RPC test (Alex Morcos) da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar) c6c2f0f Implement SequenceLocks functions (Alex Morcos)
| * Implement SequenceLocks functionsAlex Morcos2016-02-101-2/+2
| | | | | | | | | | | | | | SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier
* | Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ \ | | | | | | | | | | | | | | | fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
| * | Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |/
* / Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.mb300sd2015-12-151-4/+4
|/
* Prevector typePieter Wuille2015-11-131-2/+2
|
* [Univalue] add univalue over subtreeJonas Schnelli2015-10-011-1/+1
| | | | similar to secp256k1 include and compile univalue over a subtree
* Resolve issue 3166.mruddy2015-07-301-1/+31
| | | | | These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
* Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+0
| | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* TRIVIAL: Missing includesJorge Timón2015-07-231-0/+1
|
* Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli2015-06-041-7/+7
| | | | | | - implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
* remove JSON Spirit UniValue wrapperJonas Schnelli2015-06-041-7/+7
|
* expicit set UniValue type to avoid empty valuesJonas Schnelli2015-06-041-1/+1
|
* extend conversion to UniValueJonas Schnelli2015-06-041-6/+8
|
* Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik2015-06-041-13/+9
|
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
* Add test for DER-encoding edge caseSuhas Daftuar2015-02-101-0/+6
| | | | | | The fix to NegateSignatureS caused a test which had been failing in IsValidSignatureEncoding to then fail in IsLowDERSignature. Add new test so the original check remains exercised.
* Fix NegateSignatureS to not duplicate last byte of SSuhas Daftuar2015-02-101-2/+0
| | | | | | | NegateSignatureS is called with a signature without a hashtype, so do not save the last byte and append it after S negation. Updates the two tests which were affected by this bug.
* Merge pull request #5713Wladimir J. van der Laan2015-02-031-0/+73
|\ | | | | | | | | | | | | | | bf6cdeb Increase coverage of DERSIG edge cases (Pieter Wuille) 819bcf9 Add RPC test for DERSIG BIP switchover logic (Pieter Wuille) 5a47811 BIP66 changeover logic (Pieter Wuille) 092e9fe Example unit tests from BIP66 (Pieter Wuille) 80ad135 Change IsDERSignature to BIP66 implementation (Pieter Wuille)
| * Example unit tests from BIP66Pieter Wuille2015-02-011-0/+73
| |
* | Avoid storing a reference passed to SignatureChecker constructorsPieter Wuille2015-02-021-14/+14
| |
* | Use separate SignatureChecker for CMutableTransactionPieter Wuille2015-02-021-14/+14
|/
* Merge pull request #5143Wladimir J. van der Laan2015-01-081-0/+16
|\ | | | | | | | | | | da918ac Make SCRIPT_VERIFY_CLEANSTACK a standardness requirement (Pieter Wuille) b6e03cc Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6) (Pieter Wuille) ae4151b No semantic change: reuse stack variable in P2SH evaluation (Pieter Wuille)
| * Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6)Pieter Wuille2014-11-251-0/+16
| | | | | | | | | | Based on an earlier patch by Peter Todd, though the rules here are different (P2SH scripts should not have a CLEANSTACK check before the P2SH evaluation).
* | Merge pull request #5513Wladimir J. van der Laan2015-01-061-7/+0
|\ \ | | | | | | | | | | | | | | | 856e862 namespace: drop most boost namespaces and a few header cleanups (Cory Fields) 9b1ab86 namespace: drop boost::assign altogether here (Cory Fields) a324199 namespace: remove boost namespace pollution (Cory Fields)
| * | namespace: drop most boost namespaces and a few header cleanupsCory Fields2015-01-021-7/+0
| | | | | | | | | | | | A few boost::asio were left around because they're very wordy otherwise.
* | | clarify obscure uses of EvalScript()Pavel Vasin2014-12-301-4/+4
|/ / | | | | | | The 3rd argument of EvalScript() is the unsigned int flags, not a bool.
* | Use deterministically generated script testsPieter Wuille2014-12-011-22/+12
| | | | | | | | | | | | | | Now that signing is deterministic, we can require exact correspondence between the automatically generated tests and the ones read from JSON. Do this, and update the tests to those deterministic versions. Note that some flag changes weren't correctly applied before.
* | Merge pull request #5227Wladimir J. van der Laan2014-12-011-1/+2
|\ \ | |/ |/| | | | | | | | | | | | | 4cdaa95 Resize after succesful result (Pieter Wuille) 9d8604f Header define style cleanups (Pieter Wuille) a53fd41 Deterministic signing (Pieter Wuille) 3060e36 Add the RFC6979 PRNG (Pieter Wuille) a8f5087 Add HMAC-SHA256 (Pieter Wuille) 36fa4a7 Split up crypto/sha2 (Pieter Wuille)
| * Deterministic signingPieter Wuille2014-11-201-1/+2
| |
* | Make STRICTENC invalid pubkeys fail the script rather than the opcode.Pieter Wuille2014-11-201-6/+15
|/ | | | | | | This turns STRICTENC turn into a softforking-safe change (even though it is not intended as a consensus rule), and as a result guarantee that using it for mempool validation only results in consensus-valid transactions in the mempool.