aboutsummaryrefslogtreecommitdiff
path: root/src/test/skiplist_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add unit test for FindEarliestAtLeastSuhas Daftuar2017-01-121-0/+43
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* test: Fix test_random includesMarcoFalke2016-11-071-1/+1
|
* Kill insecure_random and associated global stateWladimir J. van der Laan2016-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are only a few uses of `insecure_random` outside the tests. This PR replaces uses of insecure_random (and its accompanying global state) in the core code with an FastRandomContext that is automatically seeded on creation. This is meant to be used for inner loops. The FastRandomContext can be in the outer scope, or the class itself, then rand32() is used inside the loop. Useful e.g. for pushing addresses in CNode or the fee rounding, or randomization for coin selection. As a context is created per purpose, thus it gets rid of cross-thread unprotected shared usage of a single set of globals, this should also get rid of the potential race conditions. - I'd say TxMempool::check is not called enough to warrant using a special fast random context, this is switched to GetRand() (open for discussion...) - The use of `insecure_rand` in ConnectThroughProxy has been replaced by an atomic integer counter. The only goal here is to have a different credentials pair for each connection to go on a different Tor circuit, it does not need to be random nor unpredictable. - To avoid having a FastRandomContext on every CNode, the context is passed into PushAddress as appropriate. There remains an insecure_random for test usage in `test_random.h`.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+0
| | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* TRIVIAL: Missing includesJorge Timón2015-07-231-0/+1
|
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | 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.
* Use arith_uint256 where necessaryWladimir J. van der Laan2015-01-051-6/+6
| | | | Also add conversion from/to uint256 where needed.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* move rand functions from util to new random.h/.cppPhilip Kaufmann2014-07-091-3/+4
|
* Add CChain::GetLocator() unit testPieter Wuille2014-07-061-0/+56
|
* Add skiplist unit testsPieter Wuille2014-06-291-0/+45