aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-24Merge #16263: qt: Use qInfo() if no error occursfanquake
a2aabfb749198bce896c9e597082acd67d3b863e Use qInfo() if no error occurs (Hennadii Stepanov) Pull request description: [Warning and Debugging Messages](https://doc.qt.io/qt-5/debug.html#warning-and-debugging-messages): > - `qInfo()` is used for informational messages. > - `qWarning()` is used to report warnings and recoverable errors in your application. > > If the `QT_FATAL_WARNINGS` environment variable is set, `qWarning()` exits after printing the warning message. This makes it easy to obtain a backtrace in the debugger. [`qWarning()`](https://doc.qt.io/qt-5/qtglobal.html#qWarning): > Calls the message handler with the warning message message... This function does nothing if `QT_NO_WARNING_OUTPUT` was defined during compilation; it exits if at the nth warning corresponding to the counter in environment variable `QT_FATAL_WARNINGS`. This PR allows more productive debugging using the environment variable `QT_FATAL_WARNINGS`. Examples: - https://github.com/bitcoin/bitcoin/pull/16118#issuecomment-503184695 - https://github.com/bitcoin/bitcoin/pull/16254#issuecomment-504223404 The behavior, when option `-debug=qt` is set/unset, remains unchanged. ACKs for commit a2aabf: promag: ACK a2aabfb, I also have this change locally. Empact: ACK https://github.com/bitcoin/bitcoin/pull/16263/commits/a2aabfb749198bce896c9e597082acd67d3b863e laanwj: ACK a2aabfb749198bce896c9e597082acd67d3b863e fanquake: ACK a2aabfb749198bce896c9e597082acd67d3b863e. Tree-SHA512: b4df300c9c00a1705b0d3a10227e3deaac19a98b0a898bb60d5a88872cf450fb131eba150d9dd6c29e021566ee04b3b86b7d486bbe28bd894743c128d2309155
2019-06-23Merge #16231: gui: Fix open wallet menu initialization orderfanquake
5224be5a3354e1a22ea4d7f0e40aadfccdf67064 gui: Fix open wallet menu initialization order (João Barbosa) Pull request description: Fixes #16230, the menu must be created before connecting to aboutToShow signal. ACKs for commit 5224be: hebasto: ACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064, I have tested the code on Bionic with Qt 5.12.4. ryanofsky: utACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064. Looks good, fix is simple and makes perfect sense after seeing explanation in https://github.com/bitcoin/bitcoin/pull/16118#issuecomment-503166407. Without this change (and since #16118), the menu pointer passed to `connect(m_open_wallet_action->menu(), ...)` is null and connecting has no effect. With this change, the menu is constructed earlier so the connect call can work. fanquake: ACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064 Testing included in a comment above. The segfaulting with QT_FATAL_WARNINGS is unrelated to this change. Tree-SHA512: 97b42493b37b96683058bccf39a0ee93589293d4ba8f0c60aef7f4fb9dd084cc6d5608cd5ef531cadf5e03b1f01627ef96bc2d79f784fb38cb87aa6643183d41
2019-06-22Merge #16239: wallet/rpc: follow-up clean-up/fixes to avoid_reuseMeshCollider
71d0344cf25d3aaf60112c5248198c444bc98105 docs: release note wording (Karl-Johan Alm) 3d2ff379131a01e4e9f9648b150e806104a23795 wallet/rpc: use static help text (Karl-Johan Alm) 53c3c1ea9e20f881c843a9219e48cec202e962f8 wallet/rpc/getbalances: add entry for 'mine.used' balance in results (Karl-Johan Alm) Pull request description: This addresses a few remaining issues pointed out in #13756: * First commit addresses https://github.com/bitcoin/bitcoin/pull/13756#discussion_r284907468 * Second commit addresses https://github.com/bitcoin/bitcoin/pull/13756#discussion_r294868973 Ping jnewbery and achow101 as they pointed out these issues. ACKs for commit 71d034: jnewbery: ACK 71d0344cf25d3aaf60112c5248198c444bc98105 meshcollider: re-utACK https://github.com/bitcoin/bitcoin/pull/16239/commits/71d0344cf25d3aaf60112c5248198c444bc98105 Tree-SHA512: 5e28822af0574ad07dbbed21aa2fe7866bf5770b4c0a1c150ad0da8af3152bcfb7170330a7497fa500326c594740ecf63733cf58325821e2811d7b911d5783a0
2019-06-22docs: release note wordingKarl-Johan Alm
2019-06-22wallet/rpc: use static help textKarl-Johan Alm
Always show the same help topic regardless of wallet flags, and explain that something is not always available, rather than runtime-modifying the help output.
2019-06-22wallet/rpc/getbalances: add entry for 'mine.used' balance in resultsKarl-Johan Alm
2019-06-21Use qInfo() if no error occursHennadii Stepanov
qWarning() is used to report warnings and recoverable errors in your application. qInfo() is used for informational messages (since Qt 5.5).
2019-06-21Merge #16256: doc: remove orphaned header in developer notesfanquake
5a88ea7c67448748a63ac7963c70a047a5daca79 doc: remove orphaned header in developer notes (Jon Atack) Pull request description: The "Git and GitHub tips" section was moved from doc/developer-notes.md to doc/productivity.md in 5b76c31, but the header link to that long-gone section in the developer notes remains and needs to go. So long, Git and GitHub tips, we barely knew ya. ACKs for commit 5a88ea: fanquake: ACK 5a88ea7c67448748a63ac7963c70a047a5daca79 Tree-SHA512: d2a0bea27cd9209adec2127fae5e336c44771aa46af7c544fa2c80a3df4868adafbccc30ef370369404b882fa009f7198cbf41777afd30eccf0c21a7eb1d0ad1
2019-06-21Merge #16226: Move ismine to the wallet moduleMeshCollider
e61de6306fd89fe9aae90253062e7b1b20343f8a Change ismine to take a CWallet instead of CKeyStore (Andrew Chow) 7c611e20007bf5face34d33dffa26c8db67e29ec Move ismine to wallet module (Andrew Chow) Pull request description: `IsMine` isn't used outside of the wallet except for the tests. It also doesn't make sense to be outside of the wallet. This PR moves `IsMine` into the wallet module and for it to take a `CWallet` instead of `CKeyStore`. The test that used `IsMine` is also moved to the wallet tests. This is first [prerequisites](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Class-Structure-Changes#ismine) for the wallet structure changes. ACKs for commit e61de6: MarcoFalke: re-ACK e61de6306f (only change is rebase with git auto-merge) meshcollider: Very light code review ACK https://github.com/bitcoin/bitcoin/pull/16226/commits/e61de6306fd89fe9aae90253062e7b1b20343f8a Tree-SHA512: 1cb4ad12652aef7922ab7460c6d413e8b9d1855dca78c0a286ae49d5c0765bc7996c55f262c742001d434eb9bd4215dc2cc7aae1b371ee1a82d46b32c17e6341
2019-06-21Merge #16026: Ensure that uncompressed public keys in a multisig always ↵MeshCollider
returns a legacy address a49503402b6bc21e3878e151c07529941d36aed0 Make and get the multisig redeemscript and destination in one function instead of two (Andrew Chow) Pull request description: `CreateMultisigRedeemscript()` is changed to `AddAndGetMultisigDestination()` so that the process of constructing the redeemScript and then getting the `CTxDestination` are done in the same function. This allows that function to see what the keys in the multisig are so that the correct address type is returned from `AddAndGetDestinationForScript()`. This only effects the `createmultisig` and `addmultisigaddress` RPCs and does not change signing logic as #16022 does. Alternative to #16022 and #16012 Fixes #16011 ACKs for commit a49503: Tree-SHA512: 5b0154a714deea3b2cc3a54beb420c95eeeacf4ca30c40ca80940d9d640f8b03611b0fc14c2f0710bfd8a79e8d27ad7d9ae380b4b83d52b40ab201624f2a63f0
2019-06-20doc: remove orphaned header in developer notesJon Atack
The "Git and GitHub tips" section was moved from doc/developer-notes.md to doc/productivity.md in 5b76c31, but the header link to that long-gone section in the developer notes remains and needs to go. So long, Git and GitHub tips, we barely knew ya.
2019-06-20Merge #16246: MSVC: Fix error in debug mode (Fix #16245)MarcoFalke
eb832cd3b4 MSVC: Fix error in debug mode (Fix #16245) (nicolas.dorier) Pull request description: This fix a build error in Debug mode #16245 ACKs for commit eb832c: sipsorcery: tACK eb832cd3b46a0f9abff238dfa780e4e9df05fdb7 Tree-SHA512: 6d874afc4ffd8b033ca4eafa40d3bb259bed82b4ca09afa7ed05e3b47c11422503b2f75b91da017bfa9ffc6587fff492cdd76014477ed1d90df326b304d6a77c
2019-06-20Merge #16207: test: stop generating lcov coverage when functional tests failMarcoFalke
9218ce8d48 Failing functional tests stop lcov (Aseem Sood) Pull request description: Fixes #15648 Functional tests can fail and lcov still generates a coverage file, which is inaccurate. This change stops `make` from proceeding if functional tests fail. before: ![image](https://user-images.githubusercontent.com/6106941/59449220-a9a11480-8dd4-11e9-9eff-81c42513aafa.png) after: ![image](https://user-images.githubusercontent.com/6106941/59449234-b160b900-8dd4-11e9-9d80-6e9c7f41c241.png) ACKs for commit 9218ce: laanwj: straightforward enough ACK 9218ce8d48e504aeaa983e82b206a386712e43e4 Tree-SHA512: 6bbba625f021471d897e911b0df7703153634ef133e295e7be8639346e11f5532bac04e9bab7d793e520fdf4b903219cacecc2ce1e25da0a6828a34a396729e2
2019-06-20Merge #16234: test: Add test for unknown argsMarcoFalke
fa7dd88b71 test: Add test for unknown args (MarcoFalke) Pull request description: Currently uncovered. Further reading: * https://marcofalke.github.io/btc_cov/total.coverage/src/util/system.cpp.gcov.html * Fail on unknown config file options #15021 ACKs for commit fa7dd8: promag: ACK fa7dd88b71a1c6641bd450fae29a4a31849b1afd, tests looks good to me. hebasto: ACK fa7dd88b71a1c6641bd450fae29a4a31849b1afd, I have tested the code. Tree-SHA512: 86ab370ce8e85925f945a52e81457b5678d71bbabcef01205a97782b780003f363552e0bad1ff678bccc784f82c6b511c3b88de3f8f25f62b0b713c387950564
2019-06-20Merge #15520: cirrus: Run extended test feature_pruningMarcoFalke
fa00326158 ci: Run extended tests (MarcoFalke) Pull request description: Currently not run in this repo, but in https://cirrus-ci.com/github/MarcoFalke/bitcoin https://cirrus-ci.com/github/MarcoFalke/bitcoin/1903-ciExt ACKs for commit fa0032: Tree-SHA512: e74b21084fe88dacedc5806d083c4273847fd75b202d5d829ea10e05ca94ebfe769d0e94a9b8779da4973be0e640d7b0e0bea44954006a2efe97969d118da3e4
2019-06-20ci: Run extended testsMarcoFalke
2019-06-20Make and get the multisig redeemscript and destination in one function ↵Andrew Chow
instead of two Instead of creating a redeemScript with CreateMultisigRedeemscript and then getting the destination with AddAndGetDestinationForScript, do both in the same function. CreateMultisigRedeemscript is changed to AddAndGetMultisigDestination. It creates the redeemScript and returns it via an output parameter. Then it calls AddAndGetDestinationForScript to add the destination to the keystore and get the proper destination. This allows us to inspect the public keys in the redeemScript before creating the destination so that the correct destination is used when uncompressed pubkeys are in the multisig.
2019-06-20MSVC: Fix error in debug mode (Fix #16245)nicolas.dorier
2019-06-19Change ismine to take a CWallet instead of CKeyStoreAndrew Chow
2019-06-19Move ismine to wallet moduleAndrew Chow
2019-06-19Merge #16243: doc: Remove travis badge from readmeMarcoFalke
e91f0a7af2 doc: Remove travis badge from readme (MarcoFalke) Pull request description: The readme(s) are shipped in the released source-code archive, in which case the travis badge is useless since it doesn't link to the travis result of the correct commit/tag/branch. GitHub embeds the correct links for each tag or commit that ci ran on, so we don't need this link in the readme. ACKs for commit e91f0a: hebasto: ACK e91f0a7af2aec7d924f00da25c69d8f46e0dd33d Tree-SHA512: 860435a58b38a9bd0bc62a1e74b3a63c138c9a2f09008a090d5ecc7fd86fa908d2e5eda41d16606507a238d9488fa5323405364a9556b670684a2e4838aead2d
2019-06-19Merge #16241: docs: add rapidcheck to vcpkg install listMarcoFalke
4971be76a7 docs: add rapidcheck to vcpkg install list (fanquake) Pull request description: Setting up a fresh Windows 10 VM using [this guide](https://github.com/fanquake/core-review/blob/master/windows.md), installing `rapidcheck` and building using the changes in #16235 resulted in a working `bitcoind` and all tests passing. ACKs for commit 4971be: Tree-SHA512: d0cb2d1d6ac5cdecf77c21f9b05e8803266511dbd06cb644352a229d101c7bf63f8022822852877371cce83c414275a850eb9ab6876a61c2fd1061627b7223f7
2019-06-19doc: Remove travis badge from readmeMarcoFalke
2019-06-19Merge #16235: build: Cleaned up and consolidated msbuild files (no code changes)MarcoFalke
750d1bc7df Cleaned up and consolidated msvc build files to allow faster builds and easier migration to vs2019. (Aaron Clauson) Pull request description: This PR does the following: - Big cleanup of the msbuild project files and consolidation of common build parameters into a single common include, - Gets ready for switch to building with Visual Studio 2019 and Platform Toolset v142, - Will allow me to rebase #15529 to include the Qt Projects in the msbuild config. ACKs for commit 750d1b: fanquake: ACK 750d1bc7df5ec6505a8fb92dabface887c23817c NicolasDorier: tACK 750d1bc . Good to see the boilerplate go away. Tree-SHA512: 15b2c3e095037d2b927aecf81593be6b6963a944c40d8c6b270cd0a2e1f8b67347bf6a4676a15d7ba1831a60f4ee4e6a405611e1ff5a27aa4888b2f857eef22b
2019-06-19docs: add rapidcheck to vcpkg install listfanquake
2019-06-19Cleaned up and consolidated msvc build files to allow faster builds and ↵Aaron Clauson
easier migration to vs2019.
2019-06-19Merge #13756: wallet: "avoid_reuse" wallet flag for improved privacyMeshCollider
5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 bitcoind: update -avoidpartialspends description to account for auto-enable for avoid_reuse wallets (Karl-Johan Alm) ada258f8c8f92d44d893cf9f22d15acdeca40b1a doc: release notes for avoid_reuse (Karl-Johan Alm) 27669551da52099e4a6a401acd7aa32b32832423 wallet: enable avoid_partial_spends by default if avoid_reuse is set (Karl-Johan Alm) 8f2e208f7c0468f9ba92bc789a698281b1c81284 test: add test for avoidreuse feature (Karl-Johan Alm) 0bdfbd34cf4015de87741ff549db35e5064f4e16 wallet/rpc: add 'avoid_reuse' option to RPC commands (Karl-Johan Alm) f904723e0d5883309cb0dd14b826bc45c5e776fb wallet/rpc: add setwalletflag RPC and MUTABLE_WALLET_FLAGS (Karl-Johan Alm) 8247a0da3a46d7c38943ee0304343ab7465305bd wallet: enable avoid_reuse feature (Karl-Johan Alm) eec15662fad917b169f5e3b8baaf4301dcf00a7b wallet: avoid reuse flags (Karl-Johan Alm) 58928098c299efdc7c5ddf2dc20716ca5272f21b wallet: make IsWalletFlagSet() const (Karl-Johan Alm) 129a5bafd9a3efa2fa16d780885048a06566d262 wallet: rename g_known_wallet_flags constant to KNOWN_WALLET_FLAGS (Karl-Johan Alm) Pull request description: Add a new wallet flag called `avoid_reuse` which, when enabled, will keep track of when a specific destination has been spent from, and will actively "blacklist" any new UTXOs which send to an already-spent-from destination. This improves privacy, as a payer could otherwise begin tracking a payee's wallet by regularly peppering a known UTXO with dust outputs, which would then be scooped up and used in payments by the payee, allowing the payer to map out (1) the inputs owned by the payee and (2) the destinations to which the payee is making payments. This replaces #10386 and together with the (now merged) #12257 it addresses #10065 in full. The concerns raised in https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-302361381 are also addressed due to #12257. ~~Note: this builds on top of #15780.~~ (merged) ACKs for commit 5ebc6b: jnewbery: ACK 5ebc6b0eb laanwj: Concept and code-review ACK 5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 meshcollider: Code review ACK https://github.com/bitcoin/bitcoin/pull/13756/commits/5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 achow101: ACK 5ebc6b0eb267e0552c66fffc5e5afe7df8becf80 modulo above nits Tree-SHA512: fdef45826af544cbbb45634ac367852cc467ec87081d86d08b53ca849e588617e9a0a255b7e7bb28692d15332de58d6c3d274ac003355220e4213d7d9070742e
2019-06-18Merge #16236: fuzz: Log output even if fuzzer failedMarcoFalke
fa410f67aa test: Suppress false positive leak in secure_allocator<RNGState> (MarcoFalke) fa35c4239f test: Log output even if fuzzer failed (MarcoFalke) Pull request description: Also suppress a false positive detected leak ACKs for commit fa410f: practicalswift: utACK fa410f67aa1d0ccd306dc16e438c1a034b8cc049 Tree-SHA512: 224a72ae0dd9bbe7debda17cd626c01cfbd0e45d7df47a2b591ce8ea386951ad94f4c0677dd268079a4caac382c5acac03199146015a95c308a633e9e4f84c09
2019-06-18test: Suppress false positive leak in secure_allocator<RNGState>MarcoFalke
2019-06-18test: Log output even if fuzzer failedMarcoFalke
2019-06-18Merge #16092: Don't use global (external) symbols for symbols that are used ↵MarcoFalke
in only one translation unit 0959d37e3e Don't use global (external) symbols for symbols that are used in only one translation unit (practicalswift) Pull request description: Don't use global (external) symbols for symbols that are used in only one translation unit. Before: ``` $ for SYMBOL in $(nm src/bitcoind | grep -E ' [BD] ' | c++filt | cut -f3- -d' ' | grep -v @ | grep -v : | sort | grep '[a-z]' | sort -u | grep -vE '(^_|typeinfo|vtable)'); do REFERENCES=$(git grep -lE "([^a-zA-Z]|^)${SYMBOL}([^a-zA-Z]|\$)" -- "*.cpp" "*.h") N_REFERENCES=$(wc -l <<< "${REFERENCES}") if [[ ${N_REFERENCES} > 1 ]]; then continue fi echo "Global symbol ${SYMBOL} is used in only one translation unit: ${REFERENCES}" done Global symbol g_chainstate is used in only one translation unit: src/validation.cpp Global symbol g_ui_signals is used in only one translation unit: src/ui_interface.cpp Global symbol instance_of_cmaincleanup is used in only one translation unit: src/validation.cpp Global symbol instance_of_cnetcleanup is used in only one translation unit: src/net.cpp Global symbol instance_of_cnetprocessingcleanup is used in only one translation unit: src/net_processing.cpp Global symbol pindexBestForkBase is used in only one translation unit: src/validation.cpp Global symbol pindexBestForkTip is used in only one translation unit: src/validation.cpp $ ``` After: ``` $ for SYMBOL in $(nm src/bitcoind | grep -E ' [BD] ' | c++filt | cut -f3- -d' ' | grep -v @ | grep -v : | sort | grep '[a-z]' | sort -u | grep -vE '(^_|typeinfo|vtable)'); do REFERENCES=$(git grep -lE "([^a-zA-Z]|^)${SYMBOL}([^a-zA-Z]|\$)" -- "*.cpp" "*.h") N_REFERENCES=$(wc -l <<< "${REFERENCES}") if [[ ${N_REFERENCES} > 1 ]]; then continue fi echo "Global symbol ${SYMBOL} is used in only one translation unit: ${REFERENCES}" done $ ``` ♻️ Think about future generations: save the global namespace from unnecessary pollution! ♻️ ACKs for commit 0959d3: Empact: ACK https://github.com/bitcoin/bitcoin/pull/16092/commits/0959d37e3e0f80010a78d175e3846dabf5d35919 MarcoFalke: ACK 0959d37e3e0f80010a78d175e3846dabf5d35919 hebasto: ACK 0959d37e3e0f80010a78d175e3846dabf5d35919 promag: ACK 0959d37. Tree-SHA512: 722f66bb50450f19b57e8a8fbe949f30cd651eb8564e5787cbb772a539bf3a288c048dc49e655fd73ece6a46f6dafade515ec4004729bf2b3ab83117b7c5d153
2019-06-18test: Add test for unknown argsMarcoFalke
2019-06-18Merge #16112: util: Log early messagesMarcoFalke
faa2a47cd7 logging: Add threadsafety comments (MarcoFalke) 0b282f9b00 Log early messages with -printtoconsole (Anthony Towns) 412987430c Replace OpenDebugLog() with StartLogging() (Anthony Towns) Pull request description: Early log messages are dropped on the floor and they'd never make it to the console or debug log. This can be tested by running the test included in this pull request without re-compiling the `bitcoind`. Fix that by buffering early messages and flushing them as soon as all logging options have been initialized and logging has been started. This pull request is identical to "Log early messages with -printtoconsole" (#13088) by **ajtowns**, with the following changes: * Rebased * Added docstrings for `m_buffering` and `StartLogging` * Switch `CCriticalSection` (aka `RecursiveMutex`) to just `Mutex` in the last commit * Added tests Fixes #16098 Fixes #13157 Closes #13088 ACKs for commit faa2a4: ajtowns: utACK faa2a47cd7bcdbd187035c76f8dbd0442f6818dc hebasto: ACK faa2a47cd7bcdbd187035c76f8dbd0442f6818dc kristapsk: ACK faa2a47cd7bcdbd187035c76f8dbd0442f6818dc (ran added functional test before / after recompiling, didn't do additional testing) Tree-SHA512: 685e2882642fe2a43ce171d42862582dadb840d03cda8236a994322c389ca2a1f3f431b179b2726c155c61793543bb340c568a5455d97f8b83bc7d307a85d387
2019-06-18Merge #15651: torcontrol: Use the default/standard network port for Tor ↵Wladimir J. van der Laan
hidden services, even if the internal port is set differently 8a2656702b4b5d53d1b8343c3215302e4305a038 torcontrol: Use the default/standard network port for Tor hidden services, even if the internal port is set differently (Luke Dashjr) Pull request description: Currently, the hidden service is published on the same port as the public listening port. But if a non-standard port is configured, this can be used to guess (pretty reliably) that the public IP and the hidden service are the same node. ACKs for top commit: practicalswift: utACK 8a2656702b4b5d53d1b8343c3215302e4305a038 naumenkogs: utACK 8a26567 laanwj: utACK 8a2656702b4b5d53d1b8343c3215302e4305a038 Tree-SHA512: 737c8da4f7c3f0bb22a338647d357987f5808156e3f38864168d0d8c2e2b171160812f7da4de11eef602902b304e357d76052950b72d7b3b83535b0fdd05fadc
2019-06-18Merge #12324: speed up Unserialize_impl for prevectorWladimir J. van der Laan
86b47fa741408b061ab0bda784b8678bfd7dfa88 speed up Unserialize_impl for prevector (Akio Nakamura) Pull request description: The unserializer for prevector uses `resize()` for reserve the area, but it's prefer to use `reserve()` because `resize()` have overhead to call its constructor many times. However, `reserve()` does not change the value of `_size` (a private member of prevector). This PR make the logic of read from stream to callback function, and prevector handles initilizing new values with that call-back and ajust the value of `_size`. The changes are as follows: 1. prevector.h Add a public member function named 'append'. This function has 2 params, number of elemenst to append and call-back function that initilizing new appended values. 2. serialize.h In the following two function: - `Unserialize_impl(Stream& is, prevector<N, T>& v, const unsigned char&)` - `Unserialize_impl(Stream& is, prevector<N, T>& v, const V&)` Make a callback function from each original logic of reading values from stream, and call prevector's `append()`. 3. test/prevector_tests.cpp Add a test for `append()`. ## A benchmark result is following: [Machine] MacBook Pro (macOS 10.13.3/i7 2.2GHz/mem 16GB/SSD) [result] DeserializeAndCheckBlockTest => 22% faster DeserializeBlockTest => 29% faster [before PR] # Benchmark, evals, iterations, total, min, max, median DeserializeAndCheckBlockTest, 60, 160, 94.4901, 0.0094644, 0.0104715, 0.0098339 DeserializeBlockTest, 60, 130, 65.0964, 0.00800362, 0.00895134, 0.00824187 [After PR] # Benchmark, evals, iterations, total, min, max, median DeserializeAndCheckBlockTest, 60, 160, 77.1597, 0.00767013, 0.00858959, 0.00805757 DeserializeBlockTest, 60, 130, 49.9443, 0.00613926, 0.00691187, 0.00635527 ACKs for top commit: laanwj: utACK 86b47fa741408b061ab0bda784b8678bfd7dfa88 Tree-SHA512: 62ea121ccd45a306fefc67485a1b03a853435af762607dae2426a87b15a3033d802c8556e1923727ddd1023a1837d0e5f6720c2c77b38196907e750e15fbb902
2019-06-18Merge #16171: Remove -mempoolreplacement to prevent needless block prop ↵MarcoFalke
slowness. 8053e5cdad Remove -mempoolreplacement to prevent needless block prop slowness. (Matt Corallo) Pull request description: At this point there is no reasonable excuse to disable opt-in RBF, and, unlike when this option was added, there are now significant issues created when disabling it (in the form of compact block reconstruction failures). Further, it breaks a lot of modern wallet behavior. This removes an option that is: * (a) only useful when a large portion of (other) miners enforce it as well * (b) is detrimental to everyone (income for miners, RBF notifications for others) who uses it individually otherwise * (c) is effectively unused * (d) is often confused with disabling RBF (rather than just remaining stubbornly unaware of it while the rest of the network lets it through) ACKs for commit 8053e5: practicalswift: utACK 8053e5cdade87550f0381d51feab81dedfec6c46 promag: Deprecation would save from unlikely rantings, still ACK 8053e5c. jtimon: utACK 8053e5cdade87550f0381d51feab81dedfec6c46 ajtowns: ACK 8053e5cdade87550f0381d51feab81dedfec6c46 -- quick code review, checked tests work MarcoFalke: ACK 8053e5cdade87550f0381d51feab81dedfec6c46 Tree-SHA512: 01aee8905b2487fc38a3a86649d422d2d2345bc60f878889ebda4b8680783e1f1a97c2000c27ef086719501be2abc2911b2039a259a5e5c04f3b24ff02b0427e
2019-06-18gui: Fix open wallet menu initialization orderJoão Barbosa
The menu must be created before connecting to aboutToShow signal.
2019-06-19Merge #15899: rpc: Document iswitness flag and fix bug in converttopsbtMeshCollider
fa499b5f027f77c0bf13699852c8c06f78e27bef rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke) fa5c5cd141f0265a5693234690ac757b811157d8 rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke) Pull request description: When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways: * Fixes #12989 * Fixes #15872 * Fixes #15701 * Fixes #13738 * ... When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data) ACKs for commit fa499b: meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/15899/commits/fa499b5f027f77c0bf13699852c8c06f78e27bef ryanofsky: utACK fa499b5f027f77c0bf13699852c8c06f78e27bef. Changes since last review: consolidating commits and making iswitness documentation the same across methods. PastaPastaPasta: utACK fa499b5f027f77c0bf13699852c8c06f78e27bef Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
2019-06-17Merge #16225: tests: Make coins_tests/updatecoins_simulation_test deterministicMarcoFalke
f8995807e4 tests: Make coins_tests/updatecoins_simulation_test deterministic (practicalswift) Pull request description: Make `coins_tests/updatecoins_simulation_test` deterministic. Before: ``` $ contrib/devtools/test_deterministic_coverage.sh 1000 [2019-06-15 05:36:20] Measuring coverage, run #1 of 1000 [2019-06-15 05:38:05] Measuring coverage, run #2 of 1000 [2019-06-15 05:39:49] Measuring coverage, run #3 of 1000 [2019-06-15 05:41:38] Measuring coverage, run #4 of 1000 [2019-06-15 05:43:16] Measuring coverage, run #5 of 1000 ... [2019-06-16 18:25:23] Measuring coverage, run #880 of 1000 [2019-06-16 18:27:12] Measuring coverage, run #881 of 1000 [2019-06-16 18:29:33] Measuring coverage, run #882 of 1000 [2019-06-16 18:33:00] Measuring coverage, run #883 of 1000 [2019-06-16 18:35:32] Measuring coverage, run #884 of 1000 The line coverage is non-deterministic between runs. Exiting. The test suite must be deterministic in the sense that the set of lines executed at least once must be identical between runs. This is a necessary condition for meaningful coverage measuring. --- gcovr.run-1.txt 2019-06-15 05:38:05.282359029 +0200 +++ gcovr.run-884.txt 2019-06-16 18:37:23.518298374 +0200 @@ -269,7 +269,7 @@ test/bloom_tests.cpp 320 320 100% test/bswap_tests.cpp 13 13 100% test/checkqueue_tests.cpp 223 222 99% 169 -test/coins_tests.cpp 478 472 98% 52,68,344-345,511,524 +test/coins_tests.cpp 478 474 99% 52,68,511,524 test/compilerbug_tests.cpp 18 18 100% test/compress_tests.cpp 27 27 100% test/crypto_tests.cpp 268 268 100% @@ -401,5 +401,5 @@ zmq/zmqpublishnotifier.h 5 0 0% 12,31,37,43,49 zmq/zmqrpc.cpp 23 3 13% 16,18,20,23,33-35,37,40-47,51,62,64-65 ------------------------------------------------------------------------------ -TOTAL 53323 28305 53% +TOTAL 53323 28307 53% ------------------------------------------------------------------------------ ``` After: ``` $ contrib/devtools/test_deterministic_coverage.sh 1000 [2019-06-15 05:36:20] Measuring coverage, run #1 of 1000 [2019-06-15 05:38:05] Measuring coverage, run #2 of 1000 [2019-06-15 05:39:49] Measuring coverage, run #3 of 1000 [2019-06-15 05:41:38] Measuring coverage, run #4 of 1000 [2019-06-15 05:43:16] Measuring coverage, run #5 of 1000 ... $ ``` ACKs for commit f89958: MarcoFalke: ACK f8995807e4f08fd0266899e3e227903f06da6ab1 (checked that the randomness state of g_insecure_rand_ctx is the same after three test runs) Tree-SHA512: 796d362b050c5750e351de1126b62f0f2c8e2d712cf01b6e1a3e2cc6ef92fa68439a32fc24c76d34bce4d553aee4ae4ea88a036c56eb9e25979649a19c59c3e5
2019-06-17tests: Make coins_tests/updatecoins_simulation_test deterministicpracticalswift
2019-06-17Merge #16210: rpc: add 2nd arg to signrawtransactionwithkey examplesMarcoFalke
71fd628ada Add example 2nd arg to signrawtransactionwithkey (Chris Moore) Pull request description: The RPC examples for signrawtransactionwithkey are missing the 2nd parameter. Before this change the help text showed: Examples: > bitcoin-cli signrawtransactionwithkey "myhex" > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransactionwithkey", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ With the change, it shows: Examples: > bitcoin-cli signrawtransactionwithkey "myhex" "[\"key1\",\"key2\"]" > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransactionwithkey", "params": ["myhex", "[\"key1\",\"key2\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ ACKs for commit 71fd62: Tree-SHA512: dadf6bf0ba64ac356b7b8f9ed4d483384b70080ac4b1664b27a2e72b97f25d7266f3dae89fbeade73c1bae802b5bae7b84d596c93a9ae9c748851ae35758d9a6
2019-06-17Merge #15982: tests: Make msg_block a witness blockMarcoFalke
fa1d766717 tests: Make msg_block a witness block (MarcoFalke) fa52eb55c9 test: Remove True argument to CBlock::serialize (MarcoFalke) Pull request description: Unnamed arguments are confusing as to what they mean without looking up the function signature. Since segwit is active by default in regtest, and all blocks are serialized with witness (#15664), remove the argument `with_witness=True` from all calls to `CBlock::serialize` and `BlockTransactions::serialize`. ACKs for commit fa1d76: laanwj: code-review ACK fa1d7667173eeae363d3729e3fc654057335cb44 Tree-SHA512: 2c550646f99c9ca86a223ca988c61a730f5e6646807adeaa7174fb2424a32cea3fef8bcd3e0b12e162e7ff192877d0c02fd0654df6ee1a9b821b065707c2dcbc
2019-06-17Merge #16217: getrawtransaction: inform about blockhash argument when lookup ↵MarcoFalke
fails c59e3a3261 getrawtransaction: inform about blockhash argument when lookup fails (darosior) Pull request description: Just 4 words added on `getrawtransaction` lookup error to fix #16142 ACKs for commit c59e3a: Tree-SHA512: 2219099c1240667527a9b1498a58818b5ff1c2ef366c498d2bb57963e828b3c87fa3e6b94be7e6463bd289ceabc13f9c9b1082134641594ba335ac400e6d63aa
2019-06-17Merge #16205: Refactor: Replace fprintf with tfm::formatMarcoFalke
fa8f195195 Replace remaining fprintf with tfm::format manually (MarcoFalke) fac03ec43a scripted-diff: Replace fprintf with tfm::format (MarcoFalke) fa72a64b90 tinyformat: Add doc to Bitcoin Core specific strprintf (MarcoFalke) Pull request description: This should be a refactor except in the cases where we use the wrong format specifier [1], in which case this patch is a bug fix. [1] : e.g. depends: Add libevent compatibility patch for windows #8730 ACKs for commit fa8f19: promag: ACK fa8f195195945ce6258199af0461e3fbfbc1236d. Ideally this should be rebased before merge. practicalswift: utACK fa8f195195945ce6258199af0461e3fbfbc1236d Empact: ACK https://github.com/bitcoin/bitcoin/pull/16205/commits/fa8f195195945ce6258199af0461e3fbfbc1236d laanwj: code review and lightly tested ACK fa8f195195945ce6258199af0461e3fbfbc1236d jonatack: ACK fa8f195195945ce6258199af0461e3fbfbc1236d from light code review, building, and running linter/unit tests/extended functional tests. Tree-SHA512: 65f648b0bc383e3266a5bdb4ad8c8a1908a719635d49e1cd321b91254be24dbc7e22290370178e29b98ddcb3fec0889de9cbae273c7140abc9793d849534a743
2019-06-16Merge #16196: doc: Add release notes for 14897 & 15834MarcoFalke
fa55dd89cb doc: Add release notes for 14897 & 15834 (MarcoFalke) Pull request description: #14897 & #15834 ACKs for commit fa55dd: fanquake: ACK fa55dd89cbfababb400624d6c2081487ee6b176f Tree-SHA512: 301742191f3d0e9383c6fe455d18d1e153168728e75dd29b7d0a0246af1cf024cc8199e82a42d74b3e6f5b556831763e0170ed0cb7b3082c7e0c57b05a5776db
2019-06-16Merge #16149: doc: Rework section on ACK in CONTRIBUTING.mdMarcoFalke
fac5ddfc57 doc: Rework section on ACK (MarcoFalke) Pull request description: `utACK` and `t(ested) ACK` are deprecated and will be removed in the next major release. Please use the more generic `ACK` and include an explanation of what was reviewed. There was a related discussion in http://diyhpl.us/wiki/transcripts/bitcoin-core-dev-tech/2019-06-05-code-review/ section `The author could offer a guide for review`. ACKs for commit fac5dd: moneyball: ACK fac5ddfc5796022601af2c17fd0b158b2c465cba Tree-SHA512: 29177e8d96aeba055b5cad6d99be3ca1be0c61af0fdc90f70a3136872c9ad6201a02f63fbac78b90b8a56b4c06af304f2583d52a94fdd954fdcc7ad0552b9ef8
2019-06-16Merge #16186: doc/lint: Fix spelling errors identified by codespell 1.15.0fanquake
b748bf6f50dda6bb57eadf697edc320b2695e01a Fix spelling errors identified by codespell 1.15.0 (Ben Woosley) Pull request description: Note all changes are to comments / documentation. After this commit, the only remaining output is: ``` $ test/lint/lint-spelling.sh src/test/base32_tests.cpp:14: fo ==> of, for src/test/base64_tests.cpp:14: fo ==> of, for ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt ``` Note: * I ignore several valid alternative spellings ~, but changed homogenous to homogeneous as the latter is a more specific term according to the Google dictionary definitions I found~ * homogenous is present in tinyformat, hence should be addressed upstream * process' is correct only if there are plural processes ACKs for commit b748bf: practicalswift: ACK b748bf6f50dda6bb57eadf697edc320b2695e01a fanquake: ACK https://github.com/bitcoin/bitcoin/pull/16186/commits/b748bf6f50dda6bb57eadf697edc320b2695e01a Tree-SHA512: 9add7044643ce015e0a44d8b27a3f300d72c485ffff550fb6491a17f14528085289ec5caddfe02f291ea9b2cded38a0dd3079652a054e2d7fe2ff4f7b53db5d7
2019-06-16Merge #16213: doc: Remove explicit mention of versions from SECURITY.mdfanquake
fa4bc4ebf91e2bf4732063f7a374a98902436a7c doc: Remove explicit mention of version from SECURITY.md (MarcoFalke) Pull request description: The repo should not contain documentation that is not tied to any release. For example meta information like a list of maintained versions of Bitcoin Core falls into this scope. Replace the list of versions in `./SECURITY.md` with a link to the website. ACKs for commit fa4bc4: Empact: ACK https://github.com/bitcoin/bitcoin/pull/16213/commits/fa4bc4ebf91e2bf4732063f7a374a98902436a7c fanquake: ACK https://github.com/bitcoin/bitcoin/pull/16213/commits/fa4bc4ebf91e2bf4732063f7a374a98902436a7c laanwj: ACK fa4bc4ebf91e2bf4732063f7a374a98902436a7c jonatack: ACK fa4bc4ebf91e2bf4732063f7a374a98902436a7c Tree-SHA512: 152b5b19b3620b0bc63536f582340628019b8ea92429db44f232a01bfa1893b767735bf94ca693a683769eb046b160e92c72de6efb3da328f2b0ee9f4750f465
2019-06-14getrawtransaction: inform about blockhash argument when lookup failsdarosior
2019-06-14doc: Add release notes for 14897 & 15834MarcoFalke