aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #4138Wladimir J. van der Laan2014-05-121-6/+6
|\ \ \ | | | | | | | | | | | | 783b182 Remove dummy PRIszX macros for formatting (Wladimir J. van der Laan)
| * | | Remove dummy PRIszX macros for formattingWladimir J. van der Laan2014-05-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Size specifiers are no longer needed now that we use typesafe tinyformat for string formatting, instead of the system's sprintf. No functional changes. This continues the work in #3735.
* | | | Merge pull request #4165Wladimir J. van der Laan2014-05-121-2/+2
|\ \ \ \ | |_|/ / |/| | | | | | | f6b7c64 Move base58.h implementation code to base58.cpp (Pieter Wuille)
| * | | Move base58.h implementation code to base58.cppPieter Wuille2014-05-101-2/+2
| | | |
* | | | Merge pull request #4160Wladimir J. van der Laan2014-05-104-138/+180
|\ \ \ \ | |/ / / |/| | | | | | | | | | | 7cd0af7 Move bignum.h to test/ (Pieter Wuille) ccc84e0 Reduce bignum.h now it is only needed for scriptnum_tests (Pieter Wuille)
| * | | Move bignum.h to test/Pieter Wuille2014-05-092-0/+180
| | | |
| * | | Reduce bignum.h now it is only needed for scriptnum_testsPieter Wuille2014-05-093-138/+0
| | | |
* | | | Merge pull request #4102Wladimir J. van der Laan2014-05-093-11/+75
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 21bf3d2 Add tests for BoostAsioToCNetAddr (Wladimir J. van der Laan) fdbd707 Remove unused function WildcardMatch (Wladimir J. van der Laan) ee21912 rpc: Use netmasks instead of wildcards for IP address matching (Wladimir J. van der Laan) e16be73 net: Add CSubNet class for subnet matching (Wladimir J. van der Laan) d864275 Use new function parseint32 in SplitHostPort (Wladimir J. van der Laan) 0d4ea1c util: add parseint32 function with strict error reporting (Wladimir J. van der Laan)
| * | | Add tests for BoostAsioToCNetAddrWladimir J. van der Laan2014-05-091-0/+16
| | | |
| * | | Remove unused function WildcardMatchWladimir J. van der Laan2014-05-091-11/+0
| | | | | | | | | | | | | | | | | | | | No longer necessary after implementing netmask-based matching. Also remove a longer-unused function `skipspaces`.
| * | | net: Add CSubNet class for subnet matchingWladimir J. van der Laan2014-05-091-0/+37
| | | |
| * | | util: add parseint32 function with strict error reportingWladimir J. van der Laan2014-05-091-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | None of the current integer parsing functions in util check whether the result is valid and fits in the range of the type. This is required for less sloppy error reporting.
* | | | Move {Get,Set}Compact from bignum to uint256Pieter Wuille2014-05-093-90/+131
| | | |
* | | | Add multiplication and division to uint160/uint256Pieter Wuille2014-05-091-0/+71
| | | |
* | | | Exception instead of assigning 0 in case of wrong vector lengthPieter Wuille2014-05-091-5/+5
|/ / /
* | | Fix transaction testsWladimir J. van der Laan2014-05-091-1/+1
| | | | | | | | | | | | Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
* | | Merge pull request #3637Wladimir J. van der Laan2014-05-091-0/+17
|\ \ \ | | | | | | | | | | | | 6fd7ef2 Also switch the (unused) verification code to low-s instead of even-s. (Pieter Wuille)
| * | | Also switch the (unused) verification code to low-s instead of even-s.Pieter Wuille2014-03-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a81cd968 introduced a malleability breaker for signatures (using an even value for S). In e0e14e43 this was changed to the lower of two potential values, rather than the even one. Only the signing code was changed though, the (for now unused) verification code wasn't adapted.
* | | | Merge pull request #3843Wladimir J. van der Laan2014-05-093-51/+130
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd) 4d79098 Increase IsStandard() scriptSig length (Peter Todd) f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd) 6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd) 29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd) 68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
| * | | | Add rejection of non-null CHECKMULTISIG dummy valuesPeter Todd2014-05-083-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a source of transaction mutability as the dummy value was previously not checked and could be modified to something other than the usual OP_0 value.
| * | | | Let tx (in)valid tests use any SCRIPT_VERIFY flagPeter Todd2014-05-053-49/+86
| | |/ / | |/| | | | | | | | | | Previously only P2SH could be set.
* | | | Merge pull request #3965Wladimir J. van der Laan2014-05-094-0/+213
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b1fdd54 script: Add test for CScriptNum (Cory Fields) 90320d6 script: add additional script tests (Cory Fields) 05e3ecf script: remove bignum dependency (Cory Fields) 4f497cd script: switch outside users to CScriptNum (Cory Fields) 27bff74 script: switch to CScriptNum usage for scripts (Cory Fields) 48d8eb1 script: add CScriptNum class (Cory Fields)
| * | | | script: Add test for CScriptNumCory Fields2014-04-222-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because this class replaces some usages of CBigNum, tests have been added to verify that they function the same way. The only difference in their usage is the handling of out-of-range numbers. While operands are constrained to [-0x7FFFFFFF,0x7FFFFFFF], the results may overflow. The overflowing result is technically unbounded, but in practice it can be no bigger than the result of an operation on two operands. This implementation limits them to the size of an int64. CBigNum was unaware of this constraint, so it allowed for unbounded results, which were then checked before use. CScriptNum asserts if an arithmetic operation will overflow an int64_t, since scripts are not able to reach those numbers anyway. Additionally, CScriptNum will throw an exception when constructed from a vector containing more than 4 bytes This mimics the previous CastToBigNum behavior.
| * | | | script: add additional script testsCory Fields2014-04-222-0/+16
| | | | |
* | | | | Merge pull request #3860 from petertodd/test-checkmulti-n-m-zeroGavin Andresen2014-05-093-1/+107
|\ \ \ \ \ | |_|/ / / |/| | | | Test CHECKMULTISIG with m == 0 and/or n == 0
| * | | | Test CHECKMULTISIG with m == 0 and n == 0Peter Todd2014-03-122-0/+80
| | | | |
| * | | | Fix script test handling of empty scriptsPeter Todd2014-03-123-1/+27
| | | | | | | | | | | | | | | | | | | | Previously an empty script would evaluate to OP_0
* | | | | Merge pull request #4074Wladimir J. van der Laan2014-05-021-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | d3081fa Removed LevelDB changes (super3)
| * | | | | Removed LevelDB changessuper32014-05-011-2/+2
| | |/ / / | |/| | | | | | | | | | | | | Syntax Highlighting
* / | | | Add required locks in testsWladimir J. van der Laan2014-04-233-1/+5
|/ / / / | | | | | | | | | | | | Unit tests with DEBUG_LOCKORDER were running into assertions.
* | | | Merge pull request #3842 from ditto-b/masterGavin Andresen2014-04-021-1/+1
|\ \ \ \ | | | | | | | | | | Fix for GetBlockValue() after block 13,440,000
| * | | | Edit subsidy_limit_test to account for BIP42ditto-b2014-04-021-1/+1
| | |/ / | |/| | | | | | Because no one wants 4 gold mines being discovered every mibillenium.
* | | | add checks for deserialization errorsManuel Araoz2014-03-311-16/+25
| | | |
* | | | Add code generating data/sighash.json test dataManuel Araoz2014-03-311-3/+30
| | | |
* | | | Add sighash tests from data fileManuel Araoz2014-03-313-4/+562
| | | |
* | | | Merge pull request #3951Wladimir J. van der Laan2014-03-262-6/+3
|\ \ \ \ | | | | | | | | | | | | | | | 3cb1edb Update moved and dead links (Luke Dashjr)
| * | | | Update moved and dead linksLuke Dashjr2014-03-242-6/+3
| | |_|/ | |/| |
* / | | Fix test build after d138598Wladimir J. van der Laan2014-03-251-0/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | Building the tests was giving some vague error message about a doubly-defined symbol. The solution is to define ShutdownRequested in test_bitcoin.cpp as well so that init.cpp does not get pulled in.
* | | Add licenses for tests and test dataWladimir J. van der Laan2014-03-1837-13/+145
| | | | | | | | | | | | | | | | | | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* | | Merge pull request #3650Wladimir J. van der Laan2014-03-151-2/+1
|\ \ \ | |_|/ |/| | | | | 2b45345 minor style cleanups (Philip Kaufmann)
| * | minor style cleanupsPhilip Kaufmann2014-03-111-2/+1
| |/
* / Add script test to prove that OP_0 evaluates as the empty vector, rather ↵Andreas Schildbach2014-03-112-2/+6
|/ | | | than [0].
* Merge pull request #3514Wladimir J. van der Laan2014-03-101-1/+0
|\ | | | | | | f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
| * Per-peer block download tracking and stalled download detection.Pieter Wuille2014-02-081-1/+0
| | | | | | | | | | | | | | | | | | Keep track of which block is being requested (and to be requested) from each peer, and limit the number of blocks in-flight per peer. In addition, detect stalled downloads, and disconnect if they persist for too long. This means blocks are never requested twice, and should eliminate duplicate downloads during synchronization.
* | Merge pull request #3768Wladimir J. van der Laan2014-03-072-0/+21
|\ \ | | | | | | | | | fecba4e Total money limit test (Pieter Wuille)
| * | Total money limit testPieter Wuille2014-03-052-0/+21
| | | | | | | | | | | | | | | | | | Added bounds check by @il--ya. Updated-by: Wladimir van der Laan <[email protected]>
* | | Merge pull request #3737 from jgarzik/op-return-sizeGavin Andresen2014-02-261-7/+7
|\ \ \ | | | | | | | | script: reduce OP_RETURN standard relay bytes to 40
| * | | script: reduce OP_RETURN standard relay bytes to 40Jeff Garzik2014-02-261-7/+7
| |/ / | | | | | | | | | Per mailing list discussion.
* | | Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completelyGavin Andresen2014-02-261-3/+3
|\ \ \ | | | | | | | | Remove PRIx64 usage completely
| * | | Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.