aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-02-27RPC: Do all wallet access through new GetWalletForJSONRPCRequestLuke Dashjr
2017-02-27RPC/Wallet: Pass CWallet as pointer to helper functionsLuke Dashjr
2017-02-27prevector: assert successful allocationCory Fields
2017-02-27Fix importmulti returning rescan errors for wrong keysRussell Yanofsky
Bug was a missing ++i line in a new range for loop added in commit e2e2f4c "Return errors from importmulti if complete rescans are not successful"
2017-02-27tests: Fix dangling pwalletMain pointer in wallet testsWladimir J. van der Laan
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-27uint256: replace sprintf with HexStr and reverse-iteratorWladimir J. van der Laan
Instead of calling sprintf for every byte, format the hex bytes ourselves by help of HexStr and a reverse_iterator.
2017-02-26Run miner_tests with fixed optionsPieter Wuille
2017-02-26Abstract out BlockAssembler optionsPieter Wuille
2017-02-26Change bitcoin address in RPC helpaddress to an invalid address, so people ↵Marijn Stollenga
don't accidentally send coins there (like I did).
2017-02-25Merge #9847: Extra test vector for BIP32Wladimir J. van der Laan
30aedcb BIP32 extra test vector (Pieter Wuille)
2017-02-25don't throw std::bad_alloc when out of memory. Instead, terminate immediatelyCory Fields
2017-02-24Merge #9612: [trivial] Rephrase the definition of difficulty.Wladimir J. van der Laan
dc222f8 Trivial: Rephrase the definition of difficulty in the code. (Karl-Johan Alm)
2017-02-24Merge #9833: Trivial: fix comments referencing AppInit2Wladimir J. van der Laan
ef9f495 Trivial: fix comments referencing AppInit2 (Marko Bencun)
2017-02-24Merge #9840: Update sendfrom RPC help to correct coin selection misconceptionWladimir J. van der Laan
f81f0d0 Update sendfrom RPC help to correct coin selection misconception (Russell Yanofsky)
2017-02-23Trivial: Rephrase the definition of difficulty in the code.Karl-Johan Alm
2017-02-23BIP32 extra test vectorPieter Wuille
2017-02-24Trivial: fix comments referencing AppInit2Marko Bencun
It was refactored into multiple functions in 0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.
2017-02-23Update sendfrom RPC help to correct coin selection misconceptionRussell Yanofsky
2017-02-23Merge #9789: build: add --enable-werror and warn on vla'sWladimir J. van der Laan
205830a build: add --enable-werror option (Cory Fields) b602fe0 build: warn about variable length arrays (Cory Fields)
2017-02-23qt: clean up initialize/shutdown signalsMarko Bencun
- Change initializeResult(int) to initializeResult(bool) to avoid implicit type conversion. - Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers. - Remove the argument from shutdownResult(int); it was called with a constant argument.
2017-02-23build: add --enable-werror optionCory Fields
This turns some compiler warnings into errors. Useful for c-i.
2017-02-22Avoid -Wshadow warnings in wallet_testsRussell Yanofsky
Warnings introduced by commit e2e2f4c "Return errors from importmulti if complete rescans are not successful" and reported by Pavel Janík <Pavel@Janik.cz> in https://github.com/bitcoin/bitcoin/pull/9773 and https://github.com/bitcoin/bitcoin/pull/9827 wallet/test/wallet_tests.cpp: In member function ‘void wallet_tests::rescan::test_method()’: wallet/test/wallet_tests.cpp:377:17: warning: declaration of ‘wallet’ shadows a global declaration [-Wshadow] CWallet wallet;
2017-02-22Merge #9711: [Trivial] Remove incorrect help message from gettxoutproof()Wladimir J. van der Laan
9949ebf [Trivial] Remove incorrect help message from gettxoutproof() (John Newbery)
2017-02-22Merge #9819: Remove harmless read of unusued priority estimatesWladimir J. van der Laan
bc8fd12 Remove harmless read of unusued priority estimates (Alex Morcos)
2017-02-22Merge #9773: Return errors from importmulti if complete rescans are not ↵Wladimir J. van der Laan
successful e2e2f4c Return errors from importmulti if complete rescans are not successful (Russell Yanofsky)
2017-02-22Remove block file location upgrade codeMarko Bencun
An effort to reduce the size of AppInitMain(). The removed code upgrades the location of the block files when upgrading to 0.8. 0.8 seems to be the oldest version still in use.
2017-02-22Merge #9801: Removed redundant parameter from mempool.PrioritiseTransactionWladimir J. van der Laan
eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)
2017-02-22Merge #9805: Add seed.btc.petertodd.org to mainnet DNS seedsWladimir J. van der Laan
3b4dd2a Add seed.btc.petertodd.org to mainnet DNS seeds (Peter Todd)
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-22random: Add fallback if getrandom syscall not availableWladimir J. van der Laan
If the code was compiled with newer (>=3.17) kernel headers but executed on a system without the system call, every use of random would crash the program. Add a fallback for that case.
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-22squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightlyWladimir J. van der Laan
2017-02-21Removed redundant parameter from mempool.PrioritiseTransactiongubatron
(Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
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-21Remove harmless read of unusued priority estimatesAlex Morcos
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-21Fix segfault crash when shutdown the GUI in disablewallet modeJonas Schnelli
2017-02-21Merge #9798: Fix Issue #9775 (Check returned value of fopen)Wladimir J. van der Laan
40f11f8 Fix for issue #9775. Added check for open() returning a NULL pointer. (kirit93)
2017-02-21use EXIT_ codes instead of magic numbersMarko Bencun
To be consistent with other exit() calls.
2017-02-20Fix for issue #9775. Added check for open() returning a NULL pointer.kirit93
2017-02-20Read/write mempool.dat as a binary.Pavel Janík
mempool.dat is a binary file and thus it should be read/written as such. Fixes #9810.
2017-02-20Merge #9726: netbase: Do not print an error on connection timeouts through proxyWladimir J. van der Laan
3ddfe29 netbase: Do not print an error on connection timeouts through proxy (Wladimir J. van der Laan) 13f6085 netbase: Make InterruptibleRecv return an error code instead of bool (Wladimir J. van der Laan)
2017-02-20Merge #9619: Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before ↵Wladimir J. van der Laan
segwit activates 279f944 QA: Test GBT size/weight limit values (Luke Dashjr) 9fc7f0b Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activates (Luke Dashjr)
2017-02-20Merge #9760: [wallet] Remove importmulti always-true checkWladimir J. van der Laan
ec1267f [wallet] Remove importmulti always-true check (Russell Yanofsky)
2017-02-20Merge #9724: Qt/Intro: Add explanation of IBD processWladimir J. van der Laan
f6d18f5 Qt/Intro: Explain a bit more what will happen first time (Luke Dashjr) 50c5657 Qt/Intro: Storage shouldn't grow significantly with pruning enabled (Luke Dashjr) 9adb694 Qt/Intro: Move sizeWarningLabel text into C++ code (Luke Dashjr)
2017-02-20Enable host lookups for -proxy and -onion parametersJohnathan Corgan
* Extends -dns parameter (via fNameLookup) to control these two new parameters in addition to -addnode, -connect, and -seednode * Moves fNameLookup assignment earlier as needed * Changes -proxy and -onion to use Lookup() instead of LookupNumeric()
2017-02-19Add seed.btc.petertodd.org to mainnet DNS seedsPeter Todd
2017-02-19Merge #9791: Avoid VLA in hash.hWladimir J. van der Laan
5c8fd50 Avoid VLA in hash.h (Pieter Wuille)
2017-02-18Merge #9696: [trivial] Fix recently introduced typos in commentsMarcoFalke
0c9b9b7 [trivial] Fix recently introduced typos in comments (practicalswift)