aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
Commit message (Collapse)AuthorAgeFilesLines
* Merge #8927: Add script tests for FindAndDelete in pre-segwit and segwit scriptsWladimir J. van der Laan2016-10-192-0/+49
|\ | | | | | | acf853d Add script tests for FindAndDelete in pre-segwit and segwit scripts (Johnson Lau)
| * Add script tests for FindAndDelete in pre-segwit and segwit scriptsJohnson Lau2016-10-162-0/+49
| |
* | test segwit uncompressed key fixesJohnson Lau2016-10-171-1/+367
|/
* Merge #8817: update bitcoin-tx to output witness dataWladimir J. van der Laan2016-10-1311-0/+11
|\ | | | | | | 4408558 Update bitcoin-tx to output witness data. (jonnynewbs)
| * Update bitcoin-tx to output witness data.jonnynewbs2016-10-0511-0/+11
| |
* | add verbose mode to bitcoin-util-test.pyjnewbery2016-10-051-28/+56
|/
* bitcoin-util-test.py should fail if the output file is emptyjnewbery2016-09-291-0/+19
|
* Merge #8829: Add bitcoin-tx JSON testsMarcoFalke2016-09-2912-1/+997
|\ | | | | | | 54e5d7c Add bitcoin-tx JSON tests (jnewbery)
| * Add bitcoin-tx JSON testsjnewbery2016-09-2812-1/+997
| |
* | Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau2016-09-271-1/+32
| |
* | Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau2016-09-231-1/+84
|/
* Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFYBtcDrak2016-06-283-54/+54
|
* [qa] script_tests: witness tests can specify tx amountSuhas Daftuar2016-06-221-28/+95
| | | | Add tests that witness signatures cover value
* [qa] p2p segwit testsSuhas Daftuar2016-06-221-0/+84
| | | | | | | | | | | | 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-0/+132
|
* [qa] Add segwit support to script_testsPieter Wuille2016-06-221-1/+7
| | | | Contains fix by Johnson Lau.
* [qa] Add transaction tests for segwitNicolasDorier2016-06-222-0/+233
| | | | Including BIP143 P2WSH examples by jl2012.
* BIP144: Serialization, hashes, relay (sender side)Pieter Wuille2016-06-221-4/+0
| | | | | | Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
* Merge #7957: [RPC][Bitcoin-TX] Add support for sequence numberWladimir J. van der Laan2016-06-073-0/+15
|\ | | | | | | | | | | ae357d5 [Bitcoin-Tx] Add tests for sequence number support (Jonas Schnelli) e59336f [bitcoin-tx] allow to set nSequence number over the in= command (Jonas Schnelli) a946bb6 [RPC] createrawtransaction: add option to set the sequence number per input (Jonas Schnelli)
| * [Bitcoin-Tx] Add tests for sequence number supportJonas Schnelli2016-06-073-0/+15
| |
* | Adding P2SH(p2pkh) script test caseChris Stewart2016-05-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Adding basic tests for OP_CSV inside of script_tests.jsonChris Stewart2016-05-111-1/+10
|/ | | | | | | | | | | | Changing NOP3 op name to OP_CHECKSEQUENCEVERIFY, renaming instances of OP_NOP3 in script_tests.json to CHECKSEQUENCEVERIFY Cleaning up NOP3 comment Re-adding test cases that were accidentally deleted, removing dupicated test case, fixing formatting Removing re-labeling of OP_NOP3 to OP_CSV Fixing whitespace issues
* Fixing comment in script_test.json test caseChris Stewart2016-04-251-1/+1
|
* Merge script_valid and script_invalid testsPieter Wuille2016-04-052-877/+865
|
* Make script_error a mandatory 4th field for script_testsPieter Wuille2016-04-052-1158/+1194
|
* Fix some misconstructed testsPieter Wuille2016-04-052-8/+20
| | | | | | | | 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.
* Remove p2p alert handlingBtcDrak2016-03-181-0/+0
|
* Merge #7517: test: script_error checking in script_invalid testsWladimir J. van der Laan2016-03-141-496/+559
|\ | | | | | | | | | | 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-491/+554
| | | | | | | | | | | | | | | | | | | | 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: Move non-generated script_invalid test to the correct placeWladimir J. van der Laan2016-02-111-6/+6
| | | | | | | | | | This test was introduced in 9fadf1c874f938f87395495776dbae896551873d, but accidentally added in the autogenerated area.
* | BIP112: Implement CHECKSEQUENCEVERIFYMark Friedenbach2016-02-142-0/+138
|/ | | | | | | | | | - Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112) <nSequence> CHECKSEQUENCEVERIFY -> <nSequence> - Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block. - Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence() - Add bitwise AND operator to CScriptNum - Enable CHECKSEQUENCEVERIFY as a standard script verify flag - Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
* Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.mb300sd2015-12-154-32/+32
|
* unittest: fix test for null tx inputDaniel Kraft2015-10-271-3/+7
| | | | | | | | | | | Update the unittest that is meant to catch a transaction that is invalid because it has a null input. The old test failed not because of that but because it was considered a coinbase with too large script. This is already checked with a different test, though. The new test is *not* a coinbase since it has two inputs, but one of them is null. This really checks the corresponding code path in CheckTransaction.
* Add DERSIG transaction test casesJ Ross Nicoll2015-10-182-0/+8
| | | | Add test cases for DERSIG flag enforcement against transactions.
* Merge pull request #6544Wladimir J. van der Laan2015-08-191-1/+1
|\ | | | | | | | | c5c1edf Fix spelling mistake in -> if. (Mark Friedenbach) e846b2a Correct a possibly intentional pun that is nevertheless hard to read: "two times of nLockTime." What is meant is that there are two kinds, or categories of nLockTime. (Mark Friedenbach)
| * Fix spelling mistake in -> if.Mark Friedenbach2015-08-101-1/+1
| |
* | Merge pull request #6539Wladimir J. van der Laan2015-08-192-2/+2
|\ \ | |/ |/| | | 9f68ed6 typofixes (found by misspell_fixer) (Veres Lajos)
| * typofixes (found by misspell_fixer)Veres Lajos2015-08-102-2/+2
| |
* | Add support for data-based outputs (OP_RETURN) to bitcoin-tx.Pavel Janík2015-08-063-0/+32
|/
* Merge pull request #6368Wladimir J. van der Laan2015-07-091-0/+8
|\ | | | | | | cb54d17 CLTV: Add more tests to improve coverage (Esteban Ordano)
| * CLTV: Add more tests to improve coverageEsteban Ordano2015-07-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | Four cases included: * The CLTV operand type mismatches the tx locktime. In the script it is 1 (interpreted as block height), but in the tx is 500000000 (interpreted as date) * The stack is empty when executing OP_CLTV * The tx is final by having only one input with MAX_INT sequence number * The operand for CLTV is negative (after OP_0 OP_1 OP_SUB)
* | tests: Fix bitcoin-tx signing testcaseWladimir J. van der Laan2015-07-072-2/+2
|/ | | | | Fixes wrong scriptPubkey problem, which caused the transaction to not actually be signed.
* Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)Peter Todd2015-06-212-0/+106
| | | | | | | | | | | | | | | | <nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime> Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be locked until some block height or block time in the future is reached. Only the logic and unittests are implemented; this commit does not have any actual soft-fork logic in it. Thanks to Pieter Wuille for rebase. Credit goes to Gregory Maxwell for the suggestion of comparing the argument against the transaction nLockTime rather than the current time/blockheight directly.
* Add more script edge condition tests.Dave Collins2015-05-062-0/+9
| | | | | | This commit adds some tests to the script_valid.json and tx_invalid.json data which exercise more edge conditions that are not currently being tested.
* Merge pull request #6075Wladimir J. van der Laan2015-04-291-0/+18
|\ | | | | | | 9fadf1c Add additional script edge condition tests. (Dave Collins)
| * Add additional script edge condition tests.Dave Collins2015-04-281-0/+18
| | | | | | | | | | | | | | | | | | | | This commit adds several tests to the script_invalid.json data which exercise some edge conditions that are not currently being tested. These are mainly being added to cover several cases a branch coverage analysis of btcd showed are not already being covered, but given more tests of edge conditions are always a good thing, I'm contributing them upstream.
* | Correct the PUSHDATA4 minimal encoding test.Dave Collins2015-04-271-1/+1
|/ | | | | | | | | | | | | | The test which is intended to prove that the script engine is properly rejecting non-minimally encoded PUSHDATA4 data is using the wrong opcode and value. The test is using 0x4f, which is OP_1NEGATE instead of the desired 0x4e, which is OP_PUSHDATA4. Further, the push of data is intended to be 256 bytes, but the value the test is using is 0x00100000 (4096), instead of the desired 0x00010000 (256). This commit fixes both issues. This was found while examining the branch coverage in btcd against only these tests to help find missing branch coverage.
* Switch test case signing to RFC6979 extra entropyPieter Wuille2015-03-272-44/+44
| | | | | Instead of manually tweaking the deterministic nonce post-generation, pass the test case number in as extra entropy to RFC6979.
* Add test for DER-encoding edge caseSuhas Daftuar2015-02-102-0/+12
| | | | | | 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-102-2/+2
| | | | | | | 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.