Age | Commit message (Collapse) | Author | |
---|---|---|---|
2017-06-28 | Use the override specifier (C++11) where we expect to be overriding the ↵ | practicalswift | |
virtual function of a base class | |||
2017-06-07 | scripted-diff: Use new naming style for insecure_rand* functions | Pieter Wuille | |
-BEGIN VERIFY SCRIPT- sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp -END VERIFY SCRIPT- | |||
2017-06-07 | Replace rand() & ((1 << N) - 1) with randbits(N) | Pieter Wuille | |
2017-06-05 | Merge test_random.h into test_bitcoin.h | Pieter Wuille | |
2017-05-03 | Chainparams: Get rid of CChainParams& Params(std::string) | Jorge Timón | |
2017-01-14 | Remove redundant semicolons | practicalswift | |
2016-12-02 | Rename the remaining main.{h,cpp} to validation.{h,cpp} | Matt Corallo | |
2016-11-07 | test: Fix test_random includes | MarcoFalke | |
2016-10-19 | RPC: augment getblockchaininfo bip9_softforks data | mruddy | |
2016-10-17 | Kill insecure_random and associated global state | Wladimir J. van der Laan | |
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`. | |||
2016-03-15 | Test versionbits deployments | Suhas Daftuar | |
2016-03-15 | Add testing of ComputeBlockVersion | Suhas Daftuar | |
2016-03-15 | Versionbits tests | Pieter Wuille | |