aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-03-30Decrease testcase sizes in cuckoocache testsJeremy Rubin
2017-03-22Merge #10045: [trivial] Fix typos in commentsJonas Schnelli
dbf30ff [trivial] Fix typos in comments (practicalswift) Tree-SHA512: a841c96ba1a80ab57206e8ef4fa9b40ecff2244075a5539fc09f57e763bf2e92b0ed089e32a0dbac3902518dcda43d224f75a3462a560148841746560640ba70
2017-03-21[trivial] Fix typos in commentspracticalswift
2017-03-20Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.pyJohn Newbery
2017-03-20Merge #10027: Set to nullptr after deleteWladimir J. van der Laan
d93b97f Set to nullptr after delete (practicalswift) Tree-SHA512: 7201cef4541557ffe31f52ce7527c4b08a2ff5aa1eae5268bdfee5b4843881f8fd115257bef6d1b4dfb71166951950a912ce87aef160ca89c2ca2ae264cfab1b
2017-03-18Set to nullptr after deletepracticalswift
2017-03-18Merge #9911: Wshadow: various gcc fixesWladimir J. van der Laan
d7f80b6 Rename first iterator to prevent shadowing. (Pavel Janík) b42ff60 Fix shadowing of local variables. (Pavel Janík) c4b60b3 Make some global variables less-global (static) (Pavel Janík) bb2aaee Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1. (Pavel Janík) Tree-SHA512: 3aea4e28146c8f2a31351c6e2b0cce88b6f1e567a0ea0e6131624453e7193d0904e30d81b1439d8c69e281cf0e369b895851fb882ae48d5967b5c2e2c227404e
2017-03-18Merge #9987: Remove unused codeWladimir J. van der Laan
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
2017-03-18Fix shadowing of local variables.Pavel Janík
2017-03-18Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.Pavel Janík
2017-03-17Merge #9974: Add basic Qt wallet testJonas Schnelli
9576b01 Enable xvfb in travis to allow running test_bitcoin-qt (Russell Yanofsky) 9e6817e Add new test_bitcoin-qt static library dependencies (Russell Yanofsky) 2754ef1 Add simple qt wallet test sending a transaction (Russell Yanofsky) b61b34c Add braces to if statements in Qt test_main (Russell Yanofsky) cc9503c Make qt test compatible with TestChain100Setup framework (Russell Yanofsky) 91e3035 Make test_bitcoin.cpp compatible with Qt Test framework (Russell Yanofsky) Tree-SHA512: da491181848b8c39138e997ae5ff2df0b16eef2d9cdd0a965229b1a28d4fa862d5f1ef314a1736e5050e88858f329124d15c689659fc6e50fefde769ba24e523
2017-03-17Remove unused codepracticalswift
2017-03-14Merge #9497: CCheckQueue Unit TestsWladimir J. van der Laan
96c7f2c Add CheckQueue Tests (Jeremy Rubin) e207342 Fix CCheckQueue IsIdle (potential) race condition and remove dangerous constructors. (Jeremy Rubin) Tree-SHA512: 5989743ad0f8b08998335e7ca9256e168fa319053f91b9dece9dbb134885bef7753b567b591acc7135785f23d19799ed7e6375917f59fe0178d389e961633d62
2017-03-10Make test_bitcoin.cpp compatible with Qt Test frameworkRussell Yanofsky
Move Boost.Test main function and global overrides to a new test_bitcoin_main.cpp file.
2017-03-09Merge #9916: Fix msvc compiler error C4146 (minus operator applied to ↵Wladimir J. van der Laan
unsigned type) 8e0720b Fix msvc compiler error C4146 (unary minus operator applied to unsigned type) (kobake) 292112f Fix msvc compiler error C4146 (minus operator applied to unsigned type) (kobake) Tree-SHA512: 25f408daf7bf9ffe4b8b4bd62f6f6d326219189a9faf8f8c0a135c5a0cb0511af765aa2b6087a091c8863c701289bda49a2379b00cd9b10854d316a5c3fc3f8e
2017-03-08Fix msvc compiler error C4146 (unary minus operator applied to unsigned type)kobake
On msvc14, int literal '-2147483648' is invalid, because '2147483648' is unsigned type and cant't apply minus operator to unsigned type. To define the int literal correctly, use '-2147483647 - 1' formula that is also used to define INT_MIN in limits.h.
2017-03-07Improve logging in bctest.py if there is a formatting mismatchJohn Newbery
2017-03-07Merge #9548: Remove min reasonable feeWladimir J. van der Laan
ad82cb0 Remove unnecessary min fee argument in CTxMemPool constructor (Alex Morcos) 2a7b56c CBlockPolicyEstimator now uses hard coded minimum bucket feerate (Alex Morcos) ac9d3d2 Change fee estimation bucket limit variable names (Alex Morcos) Tree-SHA512: 6e3bc7df3497ed60c7620845d222063e33a0238020f5c3316e61e0eff758078588ea8dd51196ceb59aa561ba106f8cdae62cebe521adb3247108bb49f15252d6
2017-03-07Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan
b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
2017-03-07Merge #9555: [test] Avoid reading a potentially uninitialized variable in ↵MarcoFalke
tx_invalid-test (transaction_tests.cpp) 8455e36 [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift) Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
2017-03-03[cleanup] Remove coin age priority completely.Alex Morcos
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
2017-03-03[test] Remove priority from testsAlex Morcos
Remove all coin age priority functionality from unit tests and RPC tests.
2017-03-03Merge #8808: Do not shadow variables (gcc set)Wladimir J. van der Laan
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík) 9de90bb Do not shadow variables (gcc set) (Pavel Janík) Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
2017-03-02test: Report InitBlockIndex resultWladimir J. van der Laan
If InitBlockIndex fails, then it will segfault later. Same for the later ActivateBestChain. BOOST_REQUIRE the result, so that an error will be reported and the test case aborted.
2017-03-01Merge #9821: util: Specific GetOSRandom for Linux/FreeBSD/OpenBSDWladimir J. van der Laan
7e6dcd9 random: Add fallback if getrandom syscall not available (Wladimir J. van der Laan) 7cad849 sanity: Move OS random to sanity check function (Wladimir J. van der Laan) aa09ccb squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly (Wladimir J. van der Laan) 224e6eb util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD (Wladimir J. van der Laan) Tree-SHA512: 9fd408b1316c69de86674f342339b2f89192fd317c8c036b5df4320f828fa263c7966146bfc1904c51137ee4a26e4cb0f560b2cd05e18cde4d808b9b92ad15c4
2017-03-01Merge #9868: Abstract out the command line options for block assemblyWladimir J. van der Laan
277b472 Run miner_tests with fixed options (Pieter Wuille) 48faf0b Abstract out BlockAssembler options (Pieter Wuille) Tree-SHA512: 8e910904864c8653fb0358d820a4181d0496bdcbc3454c17a742af7505bfb59f7078c6d0faa9c753bdaf23b6d93d228a09913cc867fbddccd515483ebe7bfad0
2017-02-28Merge #9867: Replace remaining sprintf with snprintfWladimir J. van der Laan
19cafc6 test: Replace remaining sprintf with snprintf (Wladimir J. van der Laan) 0a17714 uint256: replace sprintf with HexStr and reverse-iterator (Wladimir J. van der Laan) Tree-SHA512: 2ba1dd4d25e1cbfff4d67b2f483448aa7c34ab5c799cddd48ba5826e5fa6df425abe35e244aaf4c52db9fccfb4d2a25a14bb4597bf9d1fce95991f270da6bb26
2017-02-27Merge #9350: [Trivial] Adding label for amount inside of ↵MarcoFalke
tx_valid/tx_invalid.json 988ce2d Adding 'amount' label to tx_valid/tx_invalid.json files (Chris Stewart) Tree-SHA512: 11c216c6565ecaa5ff4eb6122f87d3b28f89db52d1e473c0678f61c240e133698adb05e717bfb9d3db36409dfb230b902dca4029a58633be36c9f85e0db3d973
2017-02-27[cleanup] Remove estimatePriority and estimateSmartPriorityAlex Morcos
Unused everywhere now except one test.
2017-02-27[mining] Remove -blockprioritysize.Alex Morcos
Remove ability of mining code to fill part of a block with transactions sorted by coin age.
2017-02-27test: Replace remaining sprintf with snprintfWladimir J. van der Laan
Use of `sprintf` is seen as a red flag as many of its uses are insecure. OpenBSD warns about it while compiling, and some modern platforms, e.g. [cloudlibc from cloudabi](https://github.com/NuxiNL/cloudlibc) don't even provide it anymore. Although our uses of these functions are secure, it can't hurt to replace them anyway. There are only 3 occurences left, all in the tests.
2017-02-26Run miner_tests with fixed optionsPieter Wuille
2017-02-23BIP32 extra test vectorPieter Wuille
2017-02-22Merge #9815: Trivial: use EXIT_ codes instead of magic numbersWladimir J. van der Laan
a87d02a use EXIT_ codes instead of magic numbers (Marko Bencun)
2017-02-22sanity: Move OS random to sanity check functionWladimir J. van der Laan
Move the OS random test to a sanity check function that is called every time bitcoind is initialized. Keep `src/test/random_tests.cpp` for the case that later random tests are added, and keep a rudimentary test that just calls the sanity check.
2017-02-21util: Specific GetOSRandom for Linux/FreeBSD/OpenBSDWladimir J. van der Laan
These are available in sandboxes without access to files or devices. Also [they are safer and more straightforward](https://en.wikipedia.org/wiki/Entropy-supplying_system_calls) to use than `/dev/urandom` as reading from a file has quite a few edge cases: - Linux: `getrandom(buf, buflen, 0)`. [getrandom(2)](http://man7.org/linux/man-pages/man2/getrandom.2.html) was introduced in version 3.17 of the Linux kernel. - OpenBSD: `getentropy(buf, buflen)`. The [getentropy(2)](http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2) function appeared in OpenBSD 5.6. - FreeBSD and NetBSD: `sysctl(KERN_ARND)`. Not sure when this was added but it has existed for quite a while. Alternatives: - Linux has sysctl `CTL_KERN` / `KERN_RANDOM` / `RANDOM_UUID` which gives 16 bytes of randomness. This may be available on older kernels, however [sysctl is deprecated on Linux](https://lwn.net/Articles/605392/) and even removed in some distros so we shouldn't use it. Add tests for `GetOSRand()`: - Test that no error happens (otherwise `RandFailure()` which aborts) - Test that all 32 bytes are overwritten (initialize with zeros, try multiple times) Discussion: - When to use these? Currently they are always used when available. Another option would be to use them only when `/dev/urandom` is not available. But this would mean these code paths receive less testing, and I'm not sure there is any reason to prefer `/dev/urandom`. Closes: #9676
2017-02-21Merge #9727: Remove fallbacks for boost_filesystem < v3Wladimir J. van der Laan
056aba2 Remove fallbacks for boost_filesystem < v3 (Wladimir J. van der Laan)
2017-02-21use EXIT_ codes instead of magic numbersMarko Bencun
To be consistent with other exit() calls.
2017-02-16[Trivial] Update comments referencing main.cppCryptAxe
2017-02-16Add CheckQueue TestsJeremy Rubin
2017-02-10Remove fallbacks for boost_filesystem < v3Wladimir J. van der Laan
Minimum boost version was bumped to 1.47.0 in #8920, which means the configure step won't even pass with older boost. This version has boost filesystem v3, which means the (crappy) fallbacks for older versions can go.
2017-02-05Init ECC context for test_bitcoin_fuzzy.Gregory Maxwell
This avoids calling things like pubkey_parse with a null context argument.
2017-02-02net: Disallow sending messages until the version handshake is completeCory Fields
This is a change in behavior, though it's much more sane now than before.
2017-02-02Merge #9556: Remove redundant semicolonsWladimir J. van der Laan
8fc6989 Remove redundant semicolons (practicalswift)
2017-01-30Merge #9647: Skip RAII event tests if libevent is built without ↵Wladimir J. van der Laan
event_set_mem_functions 95f97f4 Skip RAII event tests if libevent is built without event_set_mem_functions (Luke Dashjr)
2017-01-30Merge #9615: Wallet incremental feeWladimir J. van der Laan
4b189c1 Change bumpfee result value from 'oldfee' to 'origfee'. (Alex Morcos) 0c0c63f Introduce WALLET_INCREMENTAL_RELAY_FEE (Alex Morcos) e8021ec Use CWallet::GetMinimumFee in bumpfee (Alex Morcos) ae9719a Refactor GetMinimumFee to give option of providing targetFee (Alex Morcos) fe8e8ef [rpc] Add incremental relay fee to getnetworkinfo (Alex Morcos) 6b331e6 Fix to have miner test aware of new separate block min tx fee (Alex Morcos) de6400d Fix missing use of dustRelayFee (Alex Morcos) 5b15870 Use incrementalRelayFee for BIP 125 replacement (Alex Morcos)
2017-01-28Skip RAII event tests if libevent is built without event_set_mem_functionsLuke Dashjr
2017-01-27[trivial] Fix typos in commentspracticalswift