aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-07Merge #13094: tests: Add test for 64-bit Windows PE, modify 32-bit test resultsWladimir J. van der Laan
ab3f4dd tests: Add test for 64-bit PE, modify 32-bit test results (Chun Kuan Lee) Pull request description: 9a75d29b6f0d6c4834e451b0fae2200786655a35 change the error result from `PIE` to `DYNAMIC_BASE`. And there are no test for 64-bit, so I made one Tree-SHA512: 9d5643dadf4d9fc34ea32d94655bfb98eec2f7bc2820b4b0f525d5acf1cd22f3acf38bf8904dda4f50fd9ca5a5e56d566a392e6f804eea6e50e03cba40048621
2018-05-07Merge #13079: Fix rescanblockchain rpc to properly report progressJonas Schnelli
16be13345 Fix rescanblockchain rpc to property report progress (Ben Woosley) Pull request description: Previously it assumed tip in all cases. This also extracts a RescanVerificationProgress helper object whose role is to manage reporting, in order to simplify ScanForWalletTransactions - more lines in total, but much simpler to follow the core logic. Tree-SHA512: 5ebed0c56fae4ccfe613ff1d7082cb6da5a86635a8993ed3af70b500a4ea43074121aea9219b2f0321fbfeb7efcb964bdc2199297a64ca0fa85d9d07aa637d40
2018-05-07Merge #13131: Add Windows shutdown handlerWladimir J. van der Laan
ddebde7 Add Windows shutdown handler (Chun Kuan Lee) Pull request description: Exit properly when clicked the red X of Windows Console Tree-SHA512: f030edd08868390662b42abfa1dc6bd702166c6c19f5b1f8e7482e202451e79fb6f37ea672c26c2eb0d32c367bfca86160fbee624696c53828f280b7070be6a0
2018-05-07Merge #13149: Handle unsuccessful fseek(...):sWladimir J. van der Laan
20ce5af Print a log message if we fail to shrink the debug log file (practicalswift) 29c9bdc Handle unsuccessful fseek(...):s (practicalswift) Pull request description: Handle unsuccessful `fseek(...)`:s. **Note to reviewers:** What is the most appropriate course of actions for each of these unsuccessful `fseek(...)`:s? Tree-SHA512: 5b3d82dbdd15d434d3f08dcb4df62888da4df8541d2586f56a4e529083005f6782c39e10645acd1ec403da83061bbfd8dbf2dddc66e09268d410ad0918c61876
2018-05-07Merge #13180: Fix re-declared scoped enum as unscoped (Causes issues with ↵Jonas Schnelli
some compilers) 43f3dec00 Remove enum specifier (to avoid re-declare scoped enum as unscoped) (donaloconnor) Pull request description: MSVC fails to compile with the changes made in #10742 The problem is enum types were changed to scoped (`enum class`) but in some places `enum` as an unscoped is used. This is a very simple fix and I've tested it. Edit: Had to remove enum altogether - `enum class` doesn't compile on clang. Tree-SHA512: 13e21666243585a133c74c81249a1fa4098d6b7aa3cda06be871fa017c0ad9bb7b0725f801160b9d31678448d668718197941fd84702ebdef15128c27d92cd70
2018-05-07Merge #13162: [net] Don't incorrectly log that REJECT messages are unknown.Wladimir J. van der Laan
fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
2018-05-06Remove enum specifier (to avoid re-declare scoped enum as unscoped)donaloconnor
2018-05-05Merge #13080: mempool: Add compile time checking for ::mempool.cs runtime ↵MarcoFalke
locking assertions cbba1d2da4 Add compile time checking for all ::mempool.cs runtime locking assertions (practicalswift) Pull request description: Add compile time checking for `::mempool.cs` runtime locking assertions. This PR is a subset of #12665. The PR was broken up to make reviewing easier. The intention is that literally all `EXCLUSIVE_LOCKS_REQUIRED`/`LOCKS_EXCLUDED`:s added in this PR should follow either directly or indirectly from `AssertLockHeld(…)`/`AssertLockNotHeld(…)`:s already existing in the repo. Consider the case where function `A(…)` contains `AssertLockHeld(cs_foo)` (without first locking `cs_foo` in `A`), and that `B(…)` calls `A(…)` (without first locking `cs_main`): * It _directly_ follows that: `A(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. * It _indirectly_ follows that: `B(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. Tree-SHA512: 1b5ec1cfca6be67edd1298fea1a52b5572ce833dd4ad05c4583f753c2d3229402663373675df87e950151d5c41aeb3ee02f0ad935ed83fe2f45ca8e4d55d901e
2018-05-05Add compile time checking for all ::mempool.cs runtime locking assertionspracticalswift
2018-05-04Merge #13163: Make it clear which functions that are intended to be ↵MarcoFalke
translation unit local c3f34d06be Make it clear which functions that are intended to be translation unit local (practicalswift) Pull request description: Make it clear which functions that are intended to be translation unit local. Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently. Tree-SHA512: 05eebd233d5cfbf6116724eec3a99b465bf534ca220f2b6f5e56341a7da41387454d3cb6ceadd8ab6714a5df94069e4ad0dcab8801ccc7e8949be7199a19fb53
2018-05-04Merge #13165: doc: Mention good first issue list in CONTRIBUTING.mdMarcoFalke
a508091c59 doc: Mention good first issue list in CONTRIBUTING.md (fanquake) Pull request description: Tree-SHA512: a954cda62d6dc8ab78809565be392a1c9f55c543e8d5c1a5a8588c0062e1a11bd4968991646e4aa5bd9b9761b1765fde4ceab8fea7a973148122ff249d728b92
2018-05-04doc: Mention good first issue list in CONTRIBUTING.mdfanquake
2018-05-03Make it clear which functions that are intended to be translation unit localpracticalswift
Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently.
2018-05-03[logging] Don't incorrectly log that REJECT messages are unknown.John Newbery
Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ```
2018-05-03Fix rescanblockchain rpc to property report progressBen Woosley
CWallet::ScanForWalletTransactions did not previously take into account pindexStop when calculating progress. Renamed progress vars to progress_*. rescanblockchain is the only rpc that uses this parameter.
2018-05-03Print a log message if we fail to shrink the debug log filepracticalswift
2018-05-03Merge #12639: Reduce cs_main lock in listunspentWladimir J. van der Laan
a59dac3 refactor: Avoid extra lookups of mapAddressBook in listunspent RPC (João Barbosa) d76962e rpc: Reduce cs_main lock in listunspent (João Barbosa) Pull request description: On my system, where the wallet has 10000 unspents, the `cs_main` lock duration changed from 191ms to 36ms. The loop that generates the response takes around 155ms. So, the lock duration is reduced to around 20%. Tree-SHA512: ddaae591f39da59a9d1a8e9ffe773d857687789476f566ca273d310ad531da6dacff80cac69f3334c601c251ac7c5ed4136656c725aa3d611c6bbf734111946e
2018-05-03Merge #13148: logging: Fix potential use-after-free in LogPrintStr(...)Wladimir J. van der Laan
0bd4cd3 logging: remove unused return value from LogPrintStr (practicalswift) 76f344d logging: Fix potential use-after-free in LogPrintStr(...) (practicalswift) Pull request description: Fix potential use-after-free in `LogPrintStr(...)`. `freopen(…)` frees `m_fileout`. Tree-SHA512: ceee1f659c10a21525aa648377afeea0a37016339f5269dea54850ba3b475aa316f4931081655717b65f981598fdc9d79a1e79e55f7084c242eeb7bf372bc4b6
2018-05-03Merge #13154: Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106Wladimir J. van der Laan
21f5680 Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106 (Russell Yanofsky) Pull request description: Tree-SHA512: 373896dd73c3ba202739433b22320a4b7ea6dc80ef84547b4ed72c7ae0d6746b109c8b1879359c43374d1816fe384cc31b24b87879ddefe993887140c2f0df9c
2018-05-03refactor: Avoid extra lookups of mapAddressBook in listunspent RPCJoão Barbosa
2018-05-03rpc: Reduce cs_main lock in listunspentJoão Barbosa
2018-05-03Merge #12729: Get rid of ambiguous OutputType::NONE valueWladimir J. van der Laan
1e46d8a Get rid of ambiguous OutputType::NONE value (Russell Yanofsky) Pull request description: Based on suggestion by @sipa https://github.com/bitcoin/bitcoin/pull/12119#issuecomment-357982763 After #12119, the NONE output type was overloaded to refer to either an output type that couldn't be parsed, or to an automatic change output mode. This change drops the NONE enum and uses a simple bool to indicate parse failure, and a new CHANGE_AUTO enum to refer the change output type. This change is almost a pure refactoring except it makes RPCs reject empty string ("") address types instead of treating them like they were unset. This simplifies the parsing code a little bit and could prevent RPC usage mistakes. It's noted in the release notes. Follows up #12408 by @MarcoFalke Followups for future PRs: - [ ] Add explicit support for specifying "auto" in `ParseOutputType` as suggested by promag and sipa: https://github.com/bitcoin/bitcoin/pull/12729#issuecomment-374799567 and https://github.com/bitcoin/bitcoin/pull/12729#discussion_r175969481 - [ ] Add wallet `AddressChangeType` method to complement `TransactionChangeType`: https://github.com/bitcoin/bitcoin/pull/12729#discussion_r175969618. Tree-SHA512: 8b08b272bcb177a0a9e556dcd965840a7fe601ef83ca97938b879c9b1a33b5b3f96939e1bceef11ba7c644ac21bfd6c1dbc6ca715cd1da4ace50475240e4ee48
2018-05-03Merge #12507: Interrupt rescan on shutdown requestWladimir J. van der Laan
c4fda76 wallet: Interrupt rescan on shutdown request (João Barbosa) Pull request description: Fixes #10987. Here are the steps to test the feature: 1. start bitcoind, generate a couple of transactions and then stop: ``` bitcoind -regtest -printtoconsole bitcoin-cli -regtest generate 100 ``` 2. apply the following patch ```diff diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2478d67ce..8f8cea40c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1671,6 +1671,7 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, CBlock } while (pindex && !fAbortRescan && !ShutdownRequested()) { + MilliSleep(500); if (pindex->nHeight % 100 == 0 && dProgressTip - dProgressStart > 0.0) { double gvp = 0; { ``` 3. start bitcoind with rescan flag, interrupt with CTRL+C and the output should look like: ``` bitcoind -regtest -printtoconsole -rescan ... ^C2018-02-22 01:00:55 AddToWallet e8bfb4501b630ad2acb91e88ab0112a779766536d2c564b04faae45ae90e18f7 2018-02-22 01:00:55 Rescan interrupted by shutdown request at block 5. Progress=1.000000 2018-02-22 01:00:55 rescan 1774ms 2018-02-22 01:00:55 setKeyPool.size() = 1995 2018-02-22 01:00:55 mapWallet.size() = 10145 2018-02-22 01:00:55 mapAddressBook.size() = 3 2018-02-22 01:00:55 Shutdown: In progress... 2018-02-22 01:00:55 scheduler thread interrupt 2018-02-22 01:00:55 Shutdown: done ``` Tree-SHA512: f9bebe2cdacf0359b6cbfcbc48ac2818a3ae7aa7822ff0c2c0de4ca2fff7c88493380b74a1c5ff2ce1de01fe605b0e5ef3576f124ea9cff8ef25a9e762477b92
2018-05-02Merge #12928: qt: Initialize non-static class members that were previously ↵Wladimir J. van der Laan
neither initialized where defined nor in constructor 3fdc5fe Make sure initialization occurs in the constructor (practicalswift) 1e7813e Remove redundant initializations from the constructor (practicalswift) f131872 Initialize non-static class members where they are defined (practicalswift) 73bc1b7 Initialize editStatus and autoCompleter. Previously not initialized where defined or in constructor. (practicalswift) Pull request description: Initialize variables previously neither defined where defined nor in constructor: * `editStatus` * `autoCompleter` Also; initialize non-static class members where they are defined in accordance with developer notes. Tree-SHA512: 84f0cb87ec8394ed7641bfa0731be2ec72e6a920e00ae206ff89e2e7c960358f603c52878311b24601a33aa7cba6ea4f9a78a8ade88112dea0f41efb08e84e25
2018-05-02Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106Russell Yanofsky
2018-05-02Merge #13153: Add missing newlines to debug loggingWladimir J. van der Laan
4b75dcf devtools: Make linter check LogPrint calls (MarcoFalke) ff2ad2d Add missing newlines to LogPrint debug logging (Wladimir J. van der Laan) Pull request description: ~~Don't we have a linter that should catch these?~~ Tree-SHA512: 1a58eca01ded9c1719e943c09447deeb59bb06dba00528cf460eefe857fdf95b42671fbdebc87cdd2f51e931e86942d06587ffd097cbb0d8dd9eb7a0ba17a8f0
2018-05-02devtools: Make linter check LogPrint callsMarcoFalke
2018-05-02Add missing newlines to LogPrint debug loggingWladimir J. van der Laan
The linter only checked `LogPrintf`, not `LogPrint`. Fix the remaining cases.
2018-05-02Make sure initialization occurs in the constructorpracticalswift
2018-05-02Merge #13106: Simplify semantics of ChainStateFlushed callbackWladimir J. van der Laan
9cb6cdc Simplify semantics of ChainStateFlushed callback (Matt Corallo) 50b6533 scripted-diff: Rename SetBestChain callback ChainStateFlushed (Matt Corallo) Pull request description: Previously, ChainStateFlushed would fire either if a full flush completed (which can happen due to memory limits, forced flush, or on its own DATABASE_WRITE_INTERVAL timer) *or* on a ChainStateFlushed-specific DATABASE_WRITE_INTERVAL timer. This is both less clear for clients (as there are no guarantees about a flush having actually happened prior to the call), and reults in extra flushes not clearly intended by the code. We drop the second case, providing a strong guarantee without removing the periodit timer-based flushing. This is a follow-up to discussion in #11857. Tree-SHA512: 22ba3a0954d265d28413dbf87040790ca5b439820ee7bbadab14028295ec190de82ce5cd664426c82e58b706dc84278868026fa8d066702eb6e6962c9ace1f8e
2018-05-02wallet: Interrupt rescan on shutdown requestJoão Barbosa
2018-05-02Merge #13146: rpcauth: Make it possible to provide a custom passwordWladimir J. van der Laan
2a89b0c rpcauth: Make it possible to provide a custom password (Wladimir J. van der Laan) Pull request description: This adds the functionality to specify a custom password to `rpcauth.py`, as well as makes the code (IMO) easier to understand. Tree-SHA512: 458d54cc258e16917c0f0ce5ae1c3d6c0c03b5ab931011bf3feb09a3474f1511c38ec45822a4af2aadeaca522a002ba04a564849dd3f42fa6f36dd21b0cba093
2018-05-02Handle unsuccessful fseek(...):spracticalswift
2018-05-02logging: remove unused return value from LogPrintStrpracticalswift
`LogPrintStr` returns the number of characters printed. This number is doubled if both logging to console and logging to file is enabled. As the return value is never used, I've opted to remove it instead of try to fix it. Credit: @laanwj
2018-05-02logging: Fix potential use-after-free in LogPrintStr(...)practicalswift
2018-05-02rpcauth: Make it possible to provide a custom passwordWladimir J. van der Laan
This adds the functionality to specify a custom password to `rpcauth.py`, as well as makes the code (IMO) easier to understand.
2018-05-02Merge #13141: [doc] qt: fixes broken link on readmeWladimir J. van der Laan
12ad33a [doc] qt: fixes broken link on readme (marcoagner) Pull request description: I was reading qt files and just fixed a trivial mistake on its readme file. "#use-qt-Creator-as IDE" should be "#using-qt-creator-as-ide" Tree-SHA512: b2610821370dd7cac86725750ce7fd7a9e414c175e525f2e53e87302363c2a4a86206e0f9ce1d02657c751c395a33f0505953a94fd8124ea1943e39bb0711777
2018-05-01[doc] qt: fixes broken link on readmemarcoagner
2018-05-01Merge #13136: [tests] Fix flake8 warnings in several wallet functional testsMarcoFalke
a533834d50 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery) Pull request description: Fixes flake8 warnings in several wallet functional tests. Several wallet functional tests need rewrite to remove the accounts API (#13075). To prepare for that, I fixed all the flake8 warnings in those tests. #13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked. Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
2018-05-01[tests] Fix flake8 warnings in several wallet functional testsJohn Newbery
This commit fixes flake8 warnings in the following functional tests: - wallet_listreceivedby.py - wallet_basic.py - wallet_txn_clone.py - wallet_listsinceblock.py - wallet_import_rescan.py - wallet_listtransactions.py - wallet_importprunedfunds.py - wallet_txn_doublspend.py
2018-05-01Revert #12769: Add systemd service to bitcoind in debian packageWladimir J. van der Laan
After discussion with Matt on IRC, this is not ready for prime time until 2019 and shouldn't have been ACKed and merged. - Revert "Add systemd service for bitcoind" This reverts commit 2a87b1b07c5c4f8b9b34747c5f254c2ae1e824bf. - Revert "Sync contrib/debian from Matt Corallo's PPA" This reverts commit 9085532d35207c4a7690812ae82e476cf518d451. Tree-SHA512: 439f4ccc3e196011af448b220adf26b0e653ac589bf4cfbbc276c1500c9d08f209c9d6101e4d232857779d9f25164cfb222ed30e3d63de116f9121e6ebde31c3
2018-05-01Merge #12769: Add systemd service to bitcoind in debian packageWladimir J. van der Laan
2a87b1b Add systemd service for bitcoind (ctp-tsteenholdt) 9085532 Sync contrib/debian from Matt Corallo's PPA (ctp-tsteenholdt) Pull request description: On suggestion from @TheBlueMatt I have updated `contrib/debian` files to include a systemd service in the `bitcoind` build. Tested and working on Ubuntu 16.04 and 17.10. This fixes Issue #12758 Tree-SHA512: b6137fafee940c7410df1242c8716a87f47c5bc60eb8df3ad0184a50c2d67ef3f2728761c742670a0ad546ab6e7ad60472a721350cd6280b3bcbdc582e50ee07
2018-05-01Merge #12384: [Docs] Add version footnote to tor.mdWladimir J. van der Laan
39d2911 [Docs] Add version footnote to tor.md (Damian Williamson) Pull request description: [Docs] Add version footnote to tor.md Added note to section 2, part -edits to `/etc/tor/torrc`- indicating this is only required for Tor version 0.2.7.0 and older, since section 3 states it is valid for Tor version 0.2.7.1 and newer. Added ref link from section 2 version footnote to section 3. Re-styled headings to work on GitHub -alternate heading style markup creation issue with numbered headings and thus headings and automatic heading links are broken- Ref: [Issue# 12376](https://github.com/bitcoin/bitcoin/issues/12376) Signed-off-by: Damian Williamson \<willtech@live.com.au\> Tree-SHA512: 439f4ccc3e196011af448b220adf26b0e653ac589bf4cfbbc276c1500c9d08f209c9d6101e4d232857779d9f25164cfb222ed30e3d63de116f9121e6ebde31c3
2018-05-01Merge #13133: Remove python2 from configure.acMarcoFalke
457c2da2ac Remove python2 from configure.ac (Chun Kuan Lee) Pull request description: Tree-SHA512: 6777fe86276156bb2af092bcd679b18ce9dd71258fe843b591bb8a2fc9276ffd8803396adb6f9d8af07289ff85b344b808966d13064329e3449bb66fa0655731
2018-05-01Add Windows shutdown handlerChun Kuan Lee
2018-05-01Remove python2 from configure.acChun Kuan Lee
2018-05-01[Docs] Add version footnote to tor.mdDamian Williamson
Added note to section 2, part -edits to `/etc/tor/torrc`- indicating this is only required for Tor version 0.2.7.0 and older, since section 3 states it is valid for Tor version 0.2.7.1 and newer. Added ref link from section 2 version footnote to section 3. Re-styled headings to work on GitHub -alternate heading style markup creation issue with numbered headings and thus headings and automatic heading links are broken- Ref: [Issue# 12376](https://github.com/bitcoin/bitcoin/issues/12376) Signed-off-by: Damian Williamson <willtech@live.com.au>
2018-04-30Merge #12954: util: Refactor logging code into a global objectPieter Wuille
8c2d695c4a util: Store debug log file path in BCLog::Logger member. (Jim Posen) 8e7b961388 scripted-diff: Rename BCLog::Logger member variables. (Jim Posen) 1eac317f25 util: Refactor GetLogCategory. (Jim Posen) 3316a9ebb6 util: Encapsulate logCategories within BCLog::Logger. (Jim Posen) 6a6d764ca5 util: Move debug file management functions into Logger. (Jim Posen) f55f4fcf05 util: Establish global logger object. (Jim Posen) Pull request description: This is purely a refactor with no behavior changes. This creates a new class `BCLog::Logger` to encapsulate all global logging configuration and state. Tree-SHA512: b34811f54a53b7375d7b6f84925453c6f2419d21179379ee28b3843d0f4ff8e22020de84a5e783453ea927e9074e32de8ecd05a6fa50d7bb05502001aaed8e53
2018-04-30Merge #13130: [tests] Fix race in rpc_deprecated.pyMarcoFalke
a95bf6422a [tests] Fix race in rpc_deprecated.py (John Newbery) Pull request description: Fixes a block generation race introduced in 3576ab1261. Tree-SHA512: 044d7cff5087d0e5e950fa80d20dec6427416697820e8748bc30f4d4e6f7ff0753a44eed398432f8c33ed79948a42fb65f9f5926aa6fbd14224e8bf6b12a54ed
2018-04-30[tests] Fix race in rpc_deprecated.pyJohn Newbery
Fixes a block generation race.