aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #7053Wladimir J. van der Laan2015-11-271-1/+2
|\ | | | | | | 2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
| * Globals: Remove a bunch of Params() calls from main.cpp:Jorge Timón2015-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Chainparams: Explicit CChainParams arg for main: -AcceptBlock -AcceptBlockHeader -ActivateBestChain -ConnectTip -InitBlockIndex -LoadExternalBlockFile -VerifyDB parametric constructor 2) Also pickup more Params()\. in main.cpp 3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
* | Implement helper class for CTxMemPoolEntry constructorAlex Morcos2015-11-161-0/+7
|/ | | | This is only for unit tests.
* Chainparams: Explicit CChainParams arg for miner:Jorge Timón2015-11-111-1/+1
| | | | | | | -BitcoinMiner -CreateNewBlock -GenerateBitcoins -ProcessBlockFound
* Chainparams: Explicit CChainParams arg for main (pre miner):Jorge Timón2015-11-111-2/+3
| | | | | -ProcessNewBlock -TestBlockValidity
* tests: Initialize networking on windowsWladimir J. van der Laan2015-11-011-0/+1
|
* Chainparams: Replace CBaseChainParams::Network enum with string constants ↵Jorge Timón2015-10-201-3/+3
| | | | (suggested by Wladimir)
* Unit test doublespends in new blocksGavin Andresen2015-07-271-3/+54
| | | | | | | As suggested by Greg Maxwell-- unit test to make sure a block with a double-spend in it doesn't pass validation if half of the double-spend is already in the memory pool (so full-blown transaction validation is skipped) when the block is received.
* TRIVIAL: Missing includesJorge Timón2015-07-231-0/+1
|
* Merge pull request #6047Wladimir J. van der Laan2015-05-061-0/+3
|\ | | | | | | | | a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille) a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
| * Update key.cpp to use new libsecp256k1Pieter Wuille2015-05-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libsecp256k1's API changed, so update key.cpp to use it. Libsecp256k1 now has explicit context objects, which makes it completely thread-safe. In turn, keep an explicit context object in key.cpp, which is explicitly initialized destroyed. This is not really pretty now, but it's more efficient than the static initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of its calls, libsecp256k1 wasn't actually needed). This also brings in the new blinding support in libsecp256k1. By passing in a random seed, temporary variables during the elliptic curve computations are altered, in such a way that if an attacker does not know the blind, observing the internal operations leaks less information about the keys used. This was implemented by Greg Maxwell.
* | Separate CTranslationInterface from CClientUIInterfaceJorge Timón2015-04-161-1/+1
|/
* Merge pull request #5900Wladimir J. van der Laan2015-04-011-0/+1
|\ | | | | | | 3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
| * Add a consistency check for the block chain data structuresPieter Wuille2015-03-271-0/+1
| | | | | | | | | | | | This adds a -checkblockindex (defaulting to true for regtest), which occasionally does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and mapBlocksUnlinked.
* | Initialization: setup environment before starting testsdexX72015-03-291-0/+1
|/ | | | The environment is prepared by the main thread to guard against invalid locale settings and to prevent deinitialization issues of Boost path, which can result in app crashes.
* Merge pull request #5745Wladimir J. van der Laan2015-03-201-2/+2
|\ | | | | | | 50c72f2 [Move Only] Move wallet related things to src/wallet/ (Jonas Schnelli)
| * [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-2/+2
| | | | | | | | could once be renamed from /src/wallet to /src/legacywallet.
* | tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-2/+8
|/ | | | | | | | 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.
* test: Remove UNITTEST paramsWladimir J. van der Laan2015-03-091-1/+1
| | | | | | | | | UNITTEST parameter are not used by any current tests, and the model (modifyable parameters) is inconvenient when unit-testing. As they are stored in a global structure eevery test would have to (re)set up its own parameters. For consistency it is also better to test with MAIN parameters.
* Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-14/+14
| | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Rename CWalletInterface to CValidationInterfacePieter Wuille2014-10-201-1/+1
| | | | It's useful for much more than wallets.
* Merge pull request #4834Pieter Wuille2014-10-081-1/+1
|\ | | | | | | | | | | | | | | 7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
| * Get rid of the dummy CCoinsViewCache constructor argPieter Wuille2014-09-241-1/+1
| |
* | Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-10-021-1/+1
| | | | | | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* | Revert merge of pull #4845Wladimir J. van der Laan2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | It breaks the new mingw tests! See - https://travis-ci.org/bitcoin/bitcoin/jobs/36845581 - https://travis-ci.org/bitcoin/bitcoin/jobs/36845582 This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
* | Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-09-291-1/+1
|/ | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* move rand functions from util to new random.h/.cppPhilip Kaufmann2014-07-091-3/+1
|
* Move ui_interface to bitcoin_server.aWladimir J. van der Laan2014-07-071-1/+1
| | | | | There is no need for it in the utility libraries or tools. Put it in init.cpp, and in the tests separately (as they can't link init).
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-0/+1
| | | | | | | | | This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
* 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-181-0/+4
| | | | | | | | - 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 #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-191-1/+1
|/ | | | | Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove them.
* Add main-specific node statePieter Wuille2013-12-081-0/+2
|
* Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan2013-12-041-0/+10
| | | | | Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
* bitcoin-cli: remove unneeded dependencies (only code movement)Wladimir J. van der Laan2013-12-031-1/+0
| | | | | | | | | | | | | | 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
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-4/+9
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Port Thread* methods to boost::thread_groupGavin Andresen2013-04-031-2/+4
|
* Make sure the genesis block is present after reindexPieter Wuille2013-02-011-1/+1
|
* Parallelize script verificationPieter Wuille2013-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | * During block verification (when parallelism is requested), script check actions are stored instead of being executed immediately. * After every processed transactions, its signature actions are pushed to a CScriptCheckQueue, which maintains a queue and some synchronization mechanism. * Two or more threads (if enabled) start processing elements from this queue, * When the block connection code is finished processing transactions, it joins the worker pool until the queue is empty. As cs_main is held the entire time, and all verification must be finished before the block continues processing, this does not reach the best possible performance. It is a less drastic change than some more advanced mechanisms (like doing verification out-of-band entirely, and rolling back blocks when a failure is detected). The -par=N flag controls the number of threads (1-16). 0 means auto, and is the default.
* Make test_bitcoin run in a temp datadirPieter Wuille2012-11-291-0/+7
|
* Fix tests after cache tweaksPieter Wuille2012-11-101-2/+2
|
* Add -reindex, to perform in-place reindexing of block chain filesPieter Wuille2012-11-091-1/+1
| | | | | | | Flushes the blktree/ and coins/ databases, and reindexes the block chain files, as if their contents was loaded via -loadblock. Based on earlier work by Jeff Garzik.
* Remove BDB block database supportPieter Wuille2012-10-201-5/+0
|
* Add LevelDB MemEnv supportPieter Wuille2012-10-201-1/+7
| | | | Support LevelDB memory-backed environments, and use them in unit tests.
* Use singleton block tree database instancePieter Wuille2012-10-201-0/+8
|
* Suppress output when running unit tests.Gavin Andresen2012-08-201-1/+1
| | | | | | | | This does two things: 1) Now does not output to debug.log if -printtodebugger flag is passed 2) Unit tests set -printtodebugger so only test results are output to stdout Note that -printtodebugger only actually prints to the debugger on Windows.