aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | 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.
* | | Merge pull request #3559Wladimir J. van der Laan2014-02-251-0/+36
|\ \ \ | | | | | | | | | | | | e6c6bc9 Adds additional zero checks for setCompact These encoded values should all decode to zero (Noel Tiernan)
| * | | Adds additional zero checks for setCompactNoel Tiernan2014-01-191-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These encoded values should all decode to zero Positive Numbers 0x01003456 (1 byte 0x00) 0x02000056 (2 bytes 0x0000) 0x03000000 (3 bytes 0x000000) 0x04000000 (4 bytes 0x000000_00) Negative Numbers 0x00923456 -(0 bytes, so zero) 0x01803456 -(1 byte 0x00) 0x02800056 -(2 bytes 0x0000) 0x03800000 -(3 bytes 0x000000) 0x04800000 -(4 bytes 0x000000_00)
* | | | Merge pull request #3712Wladimir J. van der Laan2014-02-251-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | a3138ed add test of DecodeBase58 skipping whitespace (Christian von Roques)
| * | | | add test of DecodeBase58 skipping whitespaceChristian von Roques2014-02-211-0/+6
| | | | |
* | | | | Merge pull request #3305 from mikehearn/fee_dropJeff Garzik2014-02-241-2/+2
|\ \ \ \ \ | |_|_|/ / |/| | | | Drop fees by 10x due to the persistently higher exchange rate.
| * | | | Drop fees by 10x due to the persistently higher exchange rate.Mike Hearn2013-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last fee drop was by 5x (from 50k satoshis to 10k satoshis) in the 0.8.2 release which was about 6 months ago. The current fee is (assuming a $500 exchange rate) about 5 dollar cents. The new fee after this patch is 0.5 cents. Miners who prefer the higher fees are obviously still able to use the command line flags to override this setting. Miners who choose to create smaller blocks will select the highest-fee paying transactions anyway. This would hopefully be the last manual adjustment ever required before floating fees become normal.
* | | | | Add HasCanonicalPushes(), and use it in IsStandardTxPieter Wuille2014-02-111-0/+18
| |_|_|/ |/| | |
* | | | Merge pull request #3601Wladimir J. van der Laan2014-01-302-2/+34
|\ \ \ \ | | | | | | | | | | | | | | | c32a486 Add more data-driven tests. (Matt Corallo)
| * | | | Add more data-driven tests.Matt Corallo2014-01-302-2/+34
| | |_|/ | |/| |
* | | | Merge pull request #2342Wladimir J. van der Laan2014-01-271-1/+50
|\ \ \ \ | | | | | | | | | | | | | | | 665bdd3 Fix off-by-one errors in use of IsFinalTx() (Peter Todd)
| * | | | Fix off-by-one errors in use of IsFinalTx()Peter Todd2014-01-261-1/+50
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CreateNewBlock() didn't take into account the fact that IsFinalTx() without any arguments tests if the transaction is considered final in the *current* block, when both those functions really needed to know if the transaction would be final in the *next* block. Additionally the UI had a similar misunderstanding. Also adds some basic tests to check that CreateNewBlock() is in fact mining nLockTime-using transactions correctly. Thanks to Wladimir J. van der Laan for rebase.
* / / / Unit test fixes for AssertLockHeld / -DDEBUG_LOCKORDERGavin Andresen2014-01-243-0/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld() would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep track of locks held). Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the wallet.
* | | small headers ordering cleanupPhilip Kaufmann2014-01-111-1/+2
| | | | | | | | | | | | | | | | | | - keep headers in alphabetical order - fix Makefile.am (2 files in 1 line - leftover) - remove some spaces etc.
* | | makefile.am: split long lines into one file per lineWladimir J. van der Laan2014-01-111-13/+40
| | | | | | | | | | | | | | | This makes it easier to read diffs. Cosmetic change to build system only.
* | | Add test for GetTime()Wladimir J. van der Laan2014-01-091-0/+8
| | | | | | | | | | | | | | | Test for mingw/wine issue #3494, where the upper word of time(NULL) return value gets clobbered.
* | | Unittests for uint256.hThomas Holenstein2013-12-253-36/+620
| | | | | | | | | | | | | | | | | | Unit tests for uint256.h. The file uint160_tests.cpp is no longer needed. The ad-hoc tests which were in uint256.h are also no longer needed. The new tests achieve 100% coverage.
* | | Merge pull request #3416Wladimir J. van der Laan2013-12-201-1/+1
|\ \ \ | | | | | | | | | | | | 9e9056c Remove -logtodebugger (Wladimir J. van der Laan)
| * | | Remove -logtodebuggerWladimir J. van der Laan2013-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-logtodebugger` is a strange, obscure, WIN32-only (mostly MSVC) thing. Let's clean up the options a bit get rid of it. test_bitcoin was using fLogToDebugger as a way to prevent logging to debug.log. For this, add a boolean (not exposed as option) fLogToDebugLog that defaults to true and is disabled in the tests.
* | | | Make bitcoin compile without wallet if "db_cxx.h" is not presentThomas Holenstein2013-12-192-2/+1
| | | | | | | | | | | | | | | | | | | | Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove them.
* | | | Improve unit test code not to compare with explanatory messages for each ↵Kangmo2013-12-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | platform. Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance. This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
* | | | Fix unit test error on OSX 10.9 using Apple LLVM v5.0.Kangmo2013-12-151-1/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the fix, there were 6 errors such as : serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()" "non-canonical ReadCompactSize(): unspecified iostream_category error" After the fix, unit test passed. The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers. g++ --version on my development environment. ``` Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix ```
* | | Add tests for correct and incorrect order of signatures for a multisigTamas Blummer2013-12-112-2/+12
| | | | | | | | | (P2SH)
* | | Merge pull request #3368 from laanwj/2013_11_disable_wallet_miningGavin Andresen2013-12-092-15/+14
|\ \ \ | | | | | | | | Allow mining RPCs with --disable-wallet
| * | | Re-enable miner tests in --disable-wallet modeWladimir J. van der Laan2013-12-092-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | Use a fixed script instead of a CReserveKey from the wallet. This does not affect the functionality or result of the tests as they never check the state of the wallet in the first place.
* | | | Add main-specific node statePieter Wuille2013-12-082-7/+21
|/ / /
* | | Split off rpc_wallet_testsWladimir J. van der Laan2013-12-043-72/+86
| | | | | | | | | | | | | | | Split wallet tests from other RPC tests. Now no #ifdef ENABLE_WALLET are needed anymore in either file.
* | | Add --disable-wallet option to build systemWladimir J. van der Laan2013-12-041-4/+13
| | | | | | | | | | | | | | | Make it possible to build Bitcoin without wallet (and thus without BDB) so that it only functions as node.
* | | Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan2013-12-042-1/+14
| | | | | | | | | | | | | | | Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
* | | Merge pull request #3320 from laanwj/2013_11_cli_splitGavin Andresen2013-12-032-2/+1
|\ \ \ | | | | | | | | bitcoin-cli: remove unneeded dependencies (only minor code movement)
| * | | bitcoin-cli: remove unneeded dependencies (only code movement)Wladimir J. van der Laan2013-12-032-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary dependencies for bitcoin-cli (leveldb, berkelydb, wallet, RPC server) Build system changes: - split libbitcoin.a into libbitcoin_common.a, libbitcoin_server.a and libbitcoin_cli.a Code changes (movement only): - split up HelpMessage into HelpMessage in init.cpp and HelpMessageCli in rpcclient.cpp - move uiInterface from init.cpp to util.cpp
* | | | Make unit tests succeed with -DDEBUG_LOCKORDERGavin Andresen2013-12-021-0/+2
| | | |
* | | | Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-10/+10
|/ / / | | | | | | | | | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* / / Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Split bitcoinrpc up into - rpcserver: bitcoind RPC server - rpcclient: bitcoin-cli RPC client - rpcprotocol: shared common HTTP/JSON-RPC protocol code One step towards making bitcoin-cli independent from the rest of the code, and thus a smaller executable that doesn't have to be linked against leveldb. This commit only does code movement, there are no functional changes.
* | tests: add testcases for strprintfWladimir J. van der Laan2013-11-131-0/+27
| |
* | configure: Simplify common AM_CPPFLAGS and AM_LDFLAGS to a Makefile.commonLuke Dashjr2013-11-111-5/+1
| |
* | Test alerts high at high PROTOCOL_VERSIONsGavin Andresen2013-11-112-5/+5
| | | | | | | | | | | | | | | | | | I regenerated the alert test data; now alerts are tested against a protocol version way above the current protocol version. So we won't have to regenerate them every time we bump PROTOCOL_VERSION in the future.