| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Kill insecure_random and associated global state | Wladimir J. van der Laan | 2016-10-17 | 1 | -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`. | ||||
| * | [test] Remove redundant print in addrman_tests | MarcoFalke | 2016-09-22 | 1 | -3/+2 |
| | | |||||
| * | net: narrow include scope after moving to netaddress | Cory Fields | 2016-07-31 | 1 | -0/+1 |
| | | | | | | Net functionality is no longer needed for CAddress/CAddrman/etc. now that CNetAddr/CService/CSubNet are dumb storage classes. | ||||
| * | net: Split resolving out of CService | Cory Fields | 2016-07-31 | 1 | -44/+56 |
| | | |||||
| * | net: Split resolving out of CNetAddr | Cory Fields | 2016-07-31 | 1 | -25/+37 |
| | | |||||
| * | Introduce enum ServiceFlags for service flags | Pieter Wuille | 2016-06-13 | 1 | -46/+46 |
| | | |||||
| * | Don't require services in -addnode | Pieter Wuille | 2016-06-13 | 1 | -46/+46 |
| | | |||||
| * | Increase test coverage for addrman and addrinfo | Ethan Heilman | 2016-01-27 | 1 | -31/+372 |
| | | | | | | | | Adds several unittests for CAddrMan and CAddrInfo. Increases the accuracy of addrman tests. Removes non-determinism in tests by overriding the random number generator. Extracts testing code from addrman class to test class. | ||||
| * | Bump copyright headers to 2015 | MarcoFalke | 2015-12-13 | 1 | -1/+1 |
| | | |||||
| * | Creates unittests for addrman, makes addrman testable. | EthanHeilman | 2015-09-24 | 1 | -0/+180 |
| Adds several unittests for addrman to verify it works as expected. Makes small modifications to addrman to allow deterministic and targeted tests. | |||||