aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
Commit message (Collapse)AuthorAgeFilesLines
* Replace test data with Dogecoin valuesRoss Nicoll2019-04-032-598/+598
| | | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow * wallet Replace RPC and deterministic signatures in unit tests with Dogecoin values. While conventionally I'd use an alternative implementation for these, as RFC 6979 compliant signature generation isn't terribly common, and there's no reason to suspect we've modified this code, I'm going to assert that it's good enough to test that the code doesn't provide different values. Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are replaced by the Dogecoin PoW tests.
* trivial: correct typosVarunram2018-08-021-1/+1
|
* scripted-diff: Remove trailing whitespacesJoão Barbosa2018-07-242-50/+50
| | | | | | | | -BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
* Add transaction tests for constant scriptCodeJohnson Lau2018-05-052-5/+53
| | | | Tests showing that CONST_SCRIPTCODE is applied only to non-segwit transactions
* Merge #12167: Make segwit failure due to CLEANSTACK violation return a ↵Pieter Wuille2018-04-041-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | SCRIPT_ERR_CLEANSTACK error code 1e747e3c1e Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code. (Mark Friedenbach) Pull request description: If a segwit script terminates with a stack size not equal to one, the current error code is EVAL_FALSE. This is semantically wrong, and prevents explicitly checking CLEANSTACK violations in the unit tests. This PR changes the error code (and affected unit tests) to use SCRIPT_ERROR_CLEANSTACK instead of SCRIPT_ERROR_EVAL_FALSE. Tree-SHA512: 8f7b1650f7a23a942cde1070e3e56420be456b4a7be42515b237e95557bf2bd5e7ba9aabd213c8092bea28c165dbe73f5a3486300089aeb01e698151b42484b1
| * Make segwit failure due to CLEANSTACK violation return a ↵Mark Friedenbach2018-01-121-14/+14
| | | | | | | | SCRIPT_ERR_CLEANSTACK error code.
* | Merge #10742: scripted-diff: Use scoped enumerations (C++11, "enum class")Wladimir J. van der Laan2018-03-271-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1f45e21 scripted-diff: Convert 11 enums into scoped enums (C++11) (practicalswift) Pull request description: Rationale (from Bjarne Stroustrup's ["C++11 FAQ"](http://www.stroustrup.com/C++11FAQ.html#enum)): > > The enum classes ("new enums", "strong enums") address three problems with traditional C++ enumerations: > > * conventional enums implicitly convert to int, causing errors when someone does not want an enumeration to act as an integer. > * conventional enums export their enumerators to the surrounding scope, causing name clashes. > * the underlying type of an enum cannot be specified, causing confusion, compatibility problems, and makes forward declaration impossible. > > The new enums are "enum class" because they combine aspects of traditional enumerations (names values) with aspects of classes (scoped members and absence of conversions). Tree-SHA512: 9656e1cf4c3cabd4378c7a38d0c2eaf79e4a54d204a3c5762330840e55ee7e141e188a3efb2b4daf0ef3110bbaff80d8b9253abf2a9b015cdc4d60b49ac2b914
| * | scripted-diff: Convert 11 enums into scoped enums (C++11)practicalswift2018-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/enum DBErrors/enum class DBErrors/g' src/wallet/walletdb.h git grep -l DB_ | xargs sed -i 's/DB_\(LOAD_OK\|CORRUPT\|NONCRITICAL_ERROR\|TOO_NEW\|LOAD_FAIL\|NEED_REWRITE\)/DBErrors::\1/g' sed -i 's/^ DBErrors::/ /g' src/wallet/walletdb.h sed -i 's/enum VerifyResult/enum class VerifyResult/g' src/wallet/db.h sed -i 's/\(VERIFY_OK\|RECOVER_OK\|RECOVER_FAIL\)/VerifyResult::\1/g' src/wallet/db.cpp sed -i 's/enum ThresholdState/enum class ThresholdState/g' src/versionbits.h git grep -l THRESHOLD_ | xargs sed -i 's/THRESHOLD_\(DEFINED\|STARTED\|LOCKED_IN\|ACTIVE\|FAILED\)/ThresholdState::\1/g' sed -i 's/^ ThresholdState::/ /g' src/versionbits.h sed -i 's/enum SigVersion/enum class SigVersion/g' src/script/interpreter.h git grep -l SIGVERSION_ | xargs sed -i 's/SIGVERSION_\(BASE\|WITNESS_V0\)/SigVersion::\1/g' sed -i 's/^ SigVersion::/ /g' src/script/interpreter.h sed -i 's/enum RetFormat {/enum class RetFormat {/g' src/rest.cpp sed -i 's/RF_\(UNDEF\|BINARY\|HEX\|JSON\)/RetFormat::\1/g' src/rest.cpp sed -i 's/^ RetFormat::/ /g' src/rest.cpp sed -i 's/enum HelpMessageMode {/enum class HelpMessageMode {/g' src/init.h git grep -l HMM_ | xargs sed -i 's/HMM_BITCOIN/HelpMessageMode::BITCOIN/g' sed -i 's/^ HelpMessageMode::/ /g' src/init.h sed -i 's/enum FeeEstimateHorizon/enum class FeeEstimateHorizon/g' src/policy/fees.h sed -i 's/enum RBFTransactionState/enum class RBFTransactionState/g' src/policy/rbf.h git grep -l RBF_ | xargs sed -i 's/RBF_TRANSACTIONSTATE_\(UNKNOWN\|REPLACEABLE_BIP125\|FINAL\)/RBFTransactionState::\1/g' sed -i 's/^ RBFTransactionState::/ /g' src/policy/rbf.h sed -i 's/enum BlockSource {/enum class BlockSource {/g' src/qt/clientmodel.h git grep -l BLOCK_SOURCE_ | xargs sed -i 's/BLOCK_SOURCE_\(NONE\|REINDEX\|DISK\|NETWORK\)/BlockSource::\1/g' sed -i 's/^ BlockSource::/ /g' src/qt/clientmodel.h sed -i 's/enum FlushStateMode {/enum class FlushStateMode {/g' src/validation.cpp sed -i 's/FLUSH_STATE_\(NONE\|IF_NEEDED\|PERIODIC\|ALWAYS\)/FlushStateMode::\1/g' src/validation.cpp sed -i 's/^ FlushStateMode::/ /g' src/validation.cpp sed -i 's/enum WitnessMode {/enum class WitnessMode {/g' src/test/script_tests.cpp sed -i 's/WITNESS_\(NONE\|PKH\|SH\)/WitnessMode::\1/g' src/test/script_tests.cpp sed -i 's/^ WitnessMode::/ /g' src/test/script_tests.cpp -END VERIFY SCRIPT-
* | | use base58 map instead of strchr()Kevin Pan2018-03-211-1/+3
|/ /
* | Merge #11372: Address encoding cleanupWladimir J. van der Laan2018-03-072-0/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille) 119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille) ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille) 32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille) Pull request description: This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting. This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic. Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
| * | Split off key_io_tests from base58_testsPieter Wuille2018-02-192-0/+0
| | |
* | | Add a test for large tx output scripts with segwit input.Richard Kiss2018-03-041-0/+4
|/ /
* | Add some script tests related to BOOL ops and odd values like negative 0.Richard Kiss2018-02-131-0/+12
| |
* | Fix a-vs-an typospracticalswift2018-02-112-4/+4
| |
* | Adding test case for SINGLE|ANYONECANPAY hash type in tx_valid.jsonChris Stewart2018-01-031-0/+6
|/
* Merge #10699: Make all script validation flags backward compatibleWladimir J. van der Laan2017-12-121-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 01013f5 Simplify tx validation tests (Pieter Wuille) 2dd6f80 Add a test that all flags are softforks (Pieter Wuille) 2851b77 Make all script verification flags softforks (Pieter Wuille) Pull request description: This change makes `SCRIPT_VERIFY_UPGRADABLE_NOPS` not apply to `OP_CHECKLOCKTIMEVERIFY` and `OP_CHECKSEQUENCEVERIFY`. This is a no-op as `UPGRADABLE_NOPS` is only set for mempool transactions, and those always have `SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY` and `SCRIPT_VERIFY_CHECKSEQUENCEVERIFY` set as well. The advantage is that setting more flags now always results in a reduction in acceptable scripts (=softfork). This results in a nice and testable property for validation, for which a new test is added. This also means that the introduction of a new definition for a NOP or witness version will likely need the following procedure (example OP_NOP8 here) * Remove OP_NOP8 from being affected by `SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS`. * Add a `SCRIPT_VERIFY_DISCOURAGE_NOP8`, which only applies to `OP_NOP8`. * Add a `SCRIPT_VERIFY_NOP8` which implements the new consensus logic. * Before activation, add `SCRIPT_VERIFY_DISCOURAGE_NOP8` to the mempool flags. * After activation, add `SCRIPT_VERIFY_NOP8` to both the mempool and consensus flags. Tree-SHA512: d3b4538986ecf646aac9dba13a8d89318baf9e308e258547ca3b99e7c0509747f323edac6b1fea4e87e7d3c01b71193794b41679ae4f86f6e11ed6be3fd62c72
| * Make all script verification flags softforksPieter Wuille2017-06-301-2/+0
| |
* | Implement BIP173 addresses and testsPieter Wuille2017-09-282-0/+102
| |
* | Add regtest testing to base58_testsPieter Wuille2017-09-281-50/+85
| |
* | Convert base58_tests from type/payload to scriptPubKey comparisonPieter Wuille2017-09-281-299/+273
| |
* | Merge #10679: Document the non-DER-conformance of one test in tx_valid.json.Wladimir J. van der Laan2017-08-231-1/+1
|\ \ | | | | | | | | | | | | | | | ecb11f5 Document the non-strict-DER-conformance of one test in tx_valid.json. (Andreas Schildbach) Tree-SHA512: 4d5ba4645fbfe8fe3f1baaa5f1a1152cdd2cbf3d901f38d8e7fbd56b16caa6a8a17f2a48c74fb725ce454dd1c870b81b2238e89d0639fcd4eee858554726e996
| * | Document the non-strict-DER-conformance of one test in tx_valid.json.Andreas Schildbach2017-08-231-1/+1
| |/ | | | | | | | | In a signature, it contains an ASN1 integer which isn't strict-DER conformant due to excessive 0xff padding: 0xffda47bfc776bcd269da4832626ac332adfca6dd835e8ecd83cd1ebe7d709b0e
* | Merge #10705: Trivial: spelling fixesMarcoFalke2017-08-161-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | f42fc1d50 doc: spelling fixes (klemens) Pull request description: patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ). Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
| * | doc: spelling fixesklemens2017-08-161-1/+1
| |/
* / Replace MAX_OPCODE for OP_NOP10.Mark Friedenbach2017-07-111-3/+3
|/ | | | That OP_NOP10 is the last executable opcode is a bit of a obscure trivia, and the MAX_OPCODE constant already exists. This merely standardizes use of MAX_OPCODE over OP_NOP10 where it makes sense and is more clear.
* Fixed multiple typosDimitris Tsapakidis2017-06-222-2/+2
| | | | | | | A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
* tests: Correct testcase in script_tests.json for large number OP_EQUALWladimir J. van der Laan2017-05-151-1/+1
| | | | | Fix a test case that was passing correctly by accident, but not testing the right thing. Reported by helo on IRC.
* Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.pyJohn Newbery2017-03-2049-1585/+0
|
* Merge #9350: [Trivial] Adding label for amount inside of ↵MarcoFalke2017-02-272-2/+2
|\ | | | | | | | | | | | | | | tx_valid/tx_invalid.json 988ce2d Adding 'amount' label to tx_valid/tx_invalid.json files (Chris Stewart) Tree-SHA512: 11c216c6565ecaa5ff4eb6122f87d3b28f89db52d1e473c0678f61c240e133698adb05e717bfb9d3db36409dfb230b902dca4029a58633be36c9f85e0db3d973
| * Adding 'amount' label to tx_valid/tx_invalid.json filesChris Stewart2016-12-152-2/+2
| |
* | testcases: explicitly specify transaction version 1John Newbery2017-01-091-22/+22
| |
* | Add test cases to test new bitcoin-tx functionalityjnewbery2016-12-2923-0/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit add testcases to test the following functions in bitcoin-tx: - add a pay to non-standard script output - add a P2SH output - add a P2WSH output - add a P2WSH wrapped in a P2SH output - add a pay to pub key output - add a P2WPKH output - add a P2WPKH wrapped in a P2SH output - add a bare multisig output - add a multisig in P2SH output - add a multisig in a P2WSH output - add a multisig in a P2WSH wrapped in as P2SH output
* | Re-enable a blank v1 Tx JSON testDouglas Roark2016-12-212-3/+8
| |
* | Remove unused test files and referencesBtcDrak2016-12-191-33/+0
|/
* Merge #7562: Bump transaction version default to 2Wladimir J. van der Laan2016-12-1516-39/+96
|\ | | | | | | | | | | | | c5c92c4 Update python tests for default tx version=2 (BtcDrak) dab207e Preserve tx version=1 for certain tests (BtcDrak) c5d746a tiny test fix for mempool_tests (Alex Morcos) 1f0ca1a Bump default transaction version to 2 (BtcDrak)
| * Update python tests for default tx version=2BtcDrak2016-12-0816-39/+96
| |
* | Fix spelling.Richard Kiss2016-12-121-1/+1
|/
* Merge #9100: tx_valid: re-order inputs to how they are encodedMarcoFalke2016-11-251-9/+9
|\ | | | | | | 5262a15 tx_valid: re-order inputs to how they are encoded (Daniel Cousens)
| * tx_valid: re-order inputs to how they are encodedDaniel Cousens2016-11-081-9/+9
| |
* | Allow bitcoin-tx to parse partial transactionsjnewbery2016-11-041-0/+10
|/ | | | Restore pre V0.13.1 functionality to bitcoin-tx and allow it to parse 0-input partial transactions.
* 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
| |