aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-23doc: sort entries in doc/README.md#Miscellaneous alphabeticallyVasil Dimov
2021-06-23doc: add basic I2P documentationVasil Dimov
2021-06-15Merge bitcoin/bitcoin#22247: Switch Appveyor CI to VS2019 stable imagefanquake
aab7fd0f8ddb34437a63d636170f5051aae285b4 Switch Appveyor CI to VS2019 stable image (Aaron Clauson) Pull request description: The current appveyor config is using the VS2019 preview image so the latest prebuilt Qt5.12.11 binaries can be used, see #22224. Appveyor updated the Visual Studio 2019 image to msbuild v16.10.1 on 14th of June. This is the version used to build the latest Qt binaries and removes the need to use the Appveyor VS2019 preview image. ACKs for top commit: MarcoFalke: review ACK aab7fd0f8ddb34437a63d636170f5051aae285b4 if green practicalswift: cr ACK aab7fd0f8ddb34437a63d636170f5051aae285b4: patch looks correct hebasto: ACK aab7fd0f8ddb34437a63d636170f5051aae285b4 Tree-SHA512: 42ea4e6e27a2099ddeed99a3352e8ff014df1e93fbcb1f0f2ebd6f22ec2fb71212275a2adb2a7858516203e566c6ba053367b4ac7e0b74457f7a35e941d6fdd4
2021-06-15Merge bitcoin-core/gui#362: Add keyboard shortcuts to context menusHennadii Stepanov
e4c916a0ea0637f4a765b1cb57ee10abef6fb4d6 Bugfix: GUI: Use a different shortcut for "1 d&ay" banning, due to conflict with "&Disconnect" (Luke Dashjr) 94e7cdd7e04ca79f89474df1400e1a189e068939 GUI: Add keyboard shortcuts for other context menus (Luke Dashjr) 02b5263cd4e02aa540cab35c2bf6cf9eda3522ae GUI: Restore keyboard shortcuts for context menu entries (Luke Dashjr) Pull request description: Various keyboard shortcuts were lost in #263; this restores them, and also adds new ones for other context menus. Note that with a context menu open, simply the shortcut by itself (no Alt) is used. ACKs for top commit: jarolrod: Code Review ACK e4c916a hebasto: ACK e4c916a0ea0637f4a765b1cb57ee10abef6fb4d6, tested on Linux Mint 20.1 (Qt 5.12.8). Tree-SHA512: 949461acf7aac592bc48a1c5abad41b167365830e0cedb3aa11b6a87bd347e16126830ea87936f9c9efc4b7df5b09d3833fae784964d6d119ed45703cfba2ffd
2021-06-14Switch Appveyor CI to VS2019 stable imageAaron Clauson
The current appveyor config is using the VS2019 preview image so the latest prebuilt Qt5.12.11 binaries can be used, see #22224. Appveyor updated the Visual Studio 2019 image to msbuild v16.10.1 on 14th of June. This is the version used to build the latest Qt binaries and removes the need to use the Appveyor VS2019 preview image.
2021-06-14Merge bitcoin/bitcoin#19238: refactor: Make CAddrMan::cs non-recursiveMarcoFalke
ae98aec9c0521cdcec76459c8200bd45ff6a1485 refactor: Make CAddrMan::cs non-recursive (Hennadii Stepanov) f5d1c7fac70f424114dae3be270fdc31589a8c34 Add AssertLockHeld to CAddrMan private functions (Hennadii Stepanov) 5ef1d0b6982f05f70ff2164ab9af1ac1d2f97f5d Add thread safety annotations to CAddrMan public functions (Hennadii Stepanov) b138973a8b4bbe061ad97011f278a21e08ea79e6 refactor: Avoid recursive locking in CAddrMan::Clear (Hennadii Stepanov) f79a664314b88941c1a2796623e846d0a5916c06 refactor: Apply consistent pattern for CAddrMan::Check usage (Hennadii Stepanov) 187b7d2bb36e6de9cd960378021ebe690619a2ef refactor: Avoid recursive locking in CAddrMan::Check (Hennadii Stepanov) f77d9c79aa41dab4285e95c9432cc6d853be67a3 refactor: Fix CAddrMan::Check style (Hennadii Stepanov) 06703973c758c2c5d0ff916993aa7055f609d2d7 Make CAddrMan::Check private (Hennadii Stepanov) efc6fac951e75ba913350bb470c3d4e6a4e284b9 refactor: Avoid recursive locking in CAddrMan::size (Hennadii Stepanov) 2da95545ea42f925dbc7703e42e9356908a8c83e test: Drop excessive locking in CAddrManTest::SimConnFail (Hennadii Stepanov) Pull request description: This PR replaces `RecursiveMutex CAddrMan::cs` with `Mutex CAddrMan::cs`. All of the related code branches are covered by appropriate lock assertions to insure that the mutex locking policy has not been changed by accident. Related to #19303. Based on #22025, and first three commits belong to it. ACKs for top commit: vasild: ACK ae98aec9c0521cdcec76459c8200bd45ff6a1485 Tree-SHA512: c3a2d3d955a75befd7e497a802b8c10730e393be9111ca263ad0464d32fae6c7edf9bd173ffb6bc9bb61c4b39073a74eba12979d47f26b0b7b4a861d100942df
2021-06-14refactor: Make CAddrMan::cs non-recursiveHennadii Stepanov
2021-06-14Add AssertLockHeld to CAddrMan private functionsHennadii Stepanov
2021-06-14Add thread safety annotations to CAddrMan public functionsHennadii Stepanov
2021-06-14refactor: Avoid recursive locking in CAddrMan::ClearHennadii Stepanov
Co-authored-by: John Newbery <john@johnnewbery.com>
2021-06-14refactor: Apply consistent pattern for CAddrMan::Check usageHennadii Stepanov
Co-authored-by: John Newbery <john@johnnewbery.com>
2021-06-14refactor: Avoid recursive locking in CAddrMan::CheckHennadii Stepanov
2021-06-14refactor: Fix CAddrMan::Check styleHennadii Stepanov
This change improves readability, and follows Developer Notes.
2021-06-14Make CAddrMan::Check privateHennadii Stepanov
Change in the addrman.h header is move-only.
2021-06-14refactor: Avoid recursive locking in CAddrMan::sizeHennadii Stepanov
2021-06-14test: Drop excessive locking in CAddrManTest::SimConnFailHennadii Stepanov
The unit test is single threaded, so there's no need to hold the mutex between Good() and Attempt(). This change avoids recursive locking in the CAddrMan::Attempt function. Co-authored-by: John Newbery <john@johnnewbery.com>
2021-06-14Merge bitcoin/bitcoin#21261: p2p: update inbound eviction protection for ↵W. J. van der Laan
multiple networks, add I2P peers 1b1088d52fbff8b1c9438d6aa8c6edcbdd471457 test: add combined I2P/onion/localhost eviction protection tests (Jon Atack) 7c2284eda22a08dbf2a560894e496e245d026ee0 test: add tests for inbound eviction protection of I2P peers (Jon Atack) ce02dd1ef1f7f54f33780b32f195d31c1cc87318 p2p: extend inbound eviction protection by network to I2P peers (Jon Atack) 70bbc62711643ec57cce620f9f7a0e1fe5fb6346 test: add combined onion/localhost eviction protection coverage (Jon Atack) 045cb40192bf3dfa6c42916237e55f86bbc788d4 p2p: remove unused m_is_onion member from NodeEvictionCandidate struct (Jon Atack) 310fab49282d507e5fa710afb20d036604bbf3a2 p2p: remove unused CompareLocalHostTimeConnected() (Jon Atack) 9e889e8a5c021b0ec7e4c4d17d418ab4a0accad4 p2p: remove unused CompareOnionTimeConnected() (Jon Atack) 787d46bb2a39fb39166882cc6e0afbc34424d88e p2p: update ProtectEvictionCandidatesByRatio() doxygen docs (Jon Atack) 1e15acf478ae071234350c9b38dc823dfe2e3419 p2p: make ProtectEvictionCandidatesByRatio() fully ratio-based (Jon Atack) 3f8105c4d251e0e81bdd31f0999004e36f8990b2 test: remove combined onion/localhost eviction protection tests (Jon Atack) 38a81a8e20b0e5ad9fef0eae8abd914619f05b25 p2p: add CompareNodeNetworkTime() comparator struct (Jon Atack) 4ee7aec47ebf6b59b4d930e6e4025e91352c05b4 p2p: add m_network to NodeEvictionCandidate struct (Jon Atack) 7321e6f2fe1641eb331f30e68646f5984d4bcbb3 p2p, refactor: rename vEvictionCandidates to eviction_candidates (Jon Atack) ec590f1d91325404383d74098a5b42a2cd67dad9 p2p, refactor: improve constness in ProtectEvictionCandidatesByRatio() (Jon Atack) 4a19f501abac4adb476a6f2a30dfdf1a35892ccc test: add ALL_NETWORKS to test utilities (Jon Atack) 519e76bb64d03ecac175ec33c31e37d0e90f037f test: speed up and simplify peer_eviction_test (Jon Atack) 1cde8005233d163723d4d5bf1bacf22e6cb7a07e p2p, refactor: rm redundant erase_size calculation in SelectNodeToEvict() (Jon Atack) Pull request description: Continuing the work in #20197 and #20685, this pull updates and abstracts our inbound eviction protection to make it fully ratio-based and easily extensible to peers connected via high-latency privacy networks that we newly support, like I2P and perhaps others soon, as these peers are disadvantaged by the latency criteria of our eviction logic. It then adds eviction protection for peers connected over I2P. As described in https://github.com/bitcoin/bitcoin/pull/20685#issuecomment-767486499, we've observed over the past few months that I2P peers have a min ping latency similar to or greater than that of onion peers. The algorithm is a basically a multi-pass knapsack: - Count the number of eviction candidates in each of the disadvantaged privacy networks. - Sort the networks from lower to higher candidate counts, so that a network with fewer candidates will have the first opportunity for any unused slots remaining from the previous iteration. In the case of a tie in candidate counts, priority is given by array member order from first to last, guesstimated to favor more unusual networks. - Iterate through the networks in this order. On each iteration, allocate each network an equal number of protected slots targeting a total number of candidates to protect, provided any slots remain in the knapsack. - Protect the candidates in that network having the longest uptime, if any in that network are present. - Continue iterating as long as we have non-allocated slots remaining and candidates available to protect. The goal of this logic is to favorise the diversity of our peer connections. The individual commit messages describe each change in more detail. Special thank you to Vasil Dimov for the excellent review feedback and the algorithm improvement that made this change much better than it would have been otherwise. Thanks also to Antoine Riard, whose review feedback nudged this change to protect disadvantaged networks having fewer, rather than more, eviction candidates. ACKs for top commit: laanwj: Code review re-ACK 1b1088d52fbff8b1c9438d6aa8c6edcbdd471457 vasild: ACK 1b1088d52fbff8b1c9438d6aa8c6edcbdd471457 Tree-SHA512: 722f790ff11f2969c79e45a5e0e938d94df78df8687e77002f32e3ef5c72a9ac10ebf8c7a9eb7f71882c97ab0e67b2778191effdb747d9ca54d7c23c2ed19a90
2021-06-14test: add combined I2P/onion/localhost eviction protection testsJon Atack
2021-06-14test: add tests for inbound eviction protection of I2P peersJon Atack
2021-06-14p2p: extend inbound eviction protection by network to I2P peersJon Atack
This commit extends our inbound eviction protection to I2P peers to favorise the diversity of peer connections, as peers connected through the I2P network are otherwise disadvantaged by our eviction criteria for their higher latency (higher min ping times) relative to IPv4 and IPv6 peers, as well as relative to Tor onion peers. The `networks` array is order-dependent in the case of a tie in candidate counts between networks (earlier array members receive priority in the case of a tie). Therefore, we place I2P candidates before localhost and onion ones in terms of opportunity to recover unused remaining protected slots from the previous iteration, guesstimating that most nodes allowing both onion and I2P inbounds will have more onion peers, followed by localhost, then I2P, as I2P support is only being added in the upcoming v22.0 release.
2021-06-14test: add combined onion/localhost eviction protection coverageJon Atack
2021-06-14p2p: remove unused m_is_onion member from NodeEvictionCandidate structJon Atack
2021-06-14p2p: remove unused CompareLocalHostTimeConnected()Jon Atack
2021-06-14p2p: remove unused CompareOnionTimeConnected()Jon Atack
2021-06-14p2p: update ProtectEvictionCandidatesByRatio() doxygen docsJon Atack
2021-06-14p2p: make ProtectEvictionCandidatesByRatio() fully ratio-basedJon Atack
with a more abstract framework to allow easily extending inbound eviction protection to peers connected through new higher-latency networks that are disadvantaged by our inbound eviction criteria, such as I2P and perhaps other BIP155 networks in the future like CJDNS. This is a change in behavior. The algorithm is a basically a multi-pass knapsack: - Count the number of eviction candidates in each of the disadvantaged privacy networks. - Sort the networks from lower to higher candidate counts, so that a network with fewer candidates will have the first opportunity for any unused slots remaining from the previous iteration. In the case of a tie in candidate counts, priority is given by array member order from first to last, guesstimated to favor more unusual networks. - Iterate through the networks in this order. On each iteration, allocate each network an equal number of protected slots targeting a total number of candidates to protect, provided any slots remain in the knapsack. - Protect the candidates in that network having the longest uptime, if any in that network are present. - Continue iterating as long as we have non-allocated slots remaining and candidates available to protect. Localhost peers are treated as a network like Tor or I2P by aliasing them to an unused Network enumerator: Network::NET_MAX. The goal is to favorise diversity of our inbound connections. Credit to Vasil Dimov for improving the algorithm from single-pass to multi-pass to better allocate unused protection slots. Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2021-06-14Bugfix: GUI: Use a different shortcut for "1 d&ay" banning, due to conflict ↵Luke Dashjr
with "&Disconnect"
2021-06-14Merge bitcoin/bitcoin#22230: build: Fix MSVC linker /SubSystem option for ↵fanquake
bitcoin-qt.exe 9edd713c184bd6b92ff7862d0df8f1a89062e9d3 build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe (Hennadii Stepanov) Pull request description: On master (6f3fbc062f97183f19a8551177371cc74a33351d), running `bitcoin-qt.exe`, which was built with MSVC, causes a terminal window open along with the GUI. This PR fixes such behavior. See Microsoft [docs](https://docs.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=msvc-160). It is still possible to use the `-printtoconsole` option for debug builds. ACKs for top commit: sipsorcery: tACK 9edd713c184bd6b92ff7862d0df8f1a89062e9d3. Tree-SHA512: 02f2874b13e484f98344f6a7e3b01fa82a78a39865787c77bd674ead22a84a7f98a1849ccad26bd2b8c8603b3e29dcc1633b0ad731ce7d61be2d6b1f9584839c
2021-06-14Merge bitcoin/bitcoin#22224: Update msvc and appveyor builds to use ↵fanquake
Qt5.12.11 binaries e25ea54dbfaf1c8ddc762a9a81bd5b761a3b8c73 Update msvc and appveyor builds to use Qt5.12.11 binaries. (Aaron Clauson) Pull request description: Synchronises the Qt version used in the msvc and Appveyor builds with #22054. I needed to use switch to the `Visual Studio 2019 Preview` Appveyor image because the compiler version on the non-preview image is too far behind and I had difficulty building a compatible Qt version for it. Once the main Appveyor `Visual Studio 2019` image reaches version `16.10.1` it can be used. ACKs for top commit: hebasto: ACK e25ea54dbfaf1c8ddc762a9a81bd5b761a3b8c73 Tree-SHA512: c5e8dcafa342df7cd8ff7c349a8186bee4cdf7fd748c5d94039e30698775058bae8099dd75a50a5079f3cbb5251e695be187bae615159e3cd45054a972c4e6bd
2021-06-13test: remove combined onion/localhost eviction protection testsJon Atack
as we are about the change the behavior sufficiently that when we have multiple disadvantaged networks and a small number of peers under test, the number of protected peers per network can be different.
2021-06-13p2p: add CompareNodeNetworkTime() comparator structJon Atack
to compare and sort peer eviction candidates by the passed-in is_local (localhost status) and network arguments, and by longest uptime.
2021-06-13p2p: add m_network to NodeEvictionCandidate structJon Atack
2021-06-13p2p, refactor: rename vEvictionCandidates to eviction_candidatesJon Atack
in ProtectEvictionCandidatesByRatio() per current style guide in doc/developer-notes.md
2021-06-13p2p, refactor: improve constness in ProtectEvictionCandidatesByRatio()Jon Atack
2021-06-13test: add ALL_NETWORKS to test utilitiesJon Atack
2021-06-13test: speed up and simplify peer_eviction_testJon Atack
This speeds up the test significantly, which helps when running it repeatedly. Suggest reviewing the diff with: colorMoved = dimmed-zebra colorMovedWs = allow-indentation-change
2021-06-13Merge bitcoin/bitcoin#21941: fuzz: Call const member functions in addrman ↵MarcoFalke
fuzz test only once faf7623106af2e106a3d9777d714d6afeb2bbd83 fuzz: Call const member functions in addrman fuzz test only once (MarcoFalke) Pull request description: Logically based on #21940 Currently the fuzz test may spend a long time generating random numbers: ![Screenshot from 2021-05-13 12-14-09](https://user-images.githubusercontent.com/6399679/118112238-06ecd880-b3e5-11eb-8013-6e0c20e6159f.png) Fix that by calling const member functions only once. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34224 ACKs for top commit: practicalswift: cr ACK faf7623106af2e106a3d9777d714d6afeb2bbd83: touches only `src/test/fuzz/addrman.cpp` Tree-SHA512: 0fe9e0111eb1706fc39bd2f90d4b87a771882bada54c01e96d8e79c2afca2f1081139d5ab680285a81835cc5142e74ada422a181db34b01904975d1e167e64c2
2021-06-13Merge bitcoin/bitcoin#22130: test: refactor: dedup utility function ↵MarcoFalke
chain_transaction() 01eedf3821f2c3ee6bab8733f8549531c844add7 test: doc: improve doc for chain_transaction() helper (Sebastian Falbesoner) 6e63e366d609312ab984b4439de2d59bb618620b test: refactor: dedup utility function chain_transaction() (Sebastian Falbesoner) Pull request description: Both tests `mempool_packages.py` and `mempool_package_onemore.py` define a utility function `chain_transaction` with a similar implementation. This PR deduplicates it by moving it into the util package and keeping the more general properties: * pass a list of parent_txids/vouts instead of single values * always mark the BIP125-replaceable flag for txs, created via `createrawtransaction` (this is needed by the `mempool_package_onemore.py` test, but doesn't hurt the other one) This is a low-hanging fruit; as a potential follow-up one could probably also deduplicate the function `chain_transaction` in `rpc_packages.py`, which looks a bit different, as it also takes the parent locking script into account and doesn't send the tx. ACKs for top commit: mjdietzx: reACK 01eedf3821f2c3ee6bab8733f8549531c844add7 klementtan: Code review ACK 01eedf3821f2c3ee6bab8733f8549531c844add7 MarcoFalke: review ACK 01eedf3821f2c3ee6bab8733f8549531c844add7 🙅 Tree-SHA512: ac7105d02c23f53d76d4ec9dc8de1074dd8faefeecd44b107921b78665279498966152fed312ecbe252a1c34a9643d531166329a4fea0e773df3bb75d43092b0
2021-06-13fuzz: Call const member functions in addrman fuzz test only onceMarcoFalke
2021-06-13Merge bitcoin/bitcoin#22102: Remove `Warning:` from warning message printed ↵MarcoFalke
for unknown new rules 6d7e46ce23217da53ff52f535879c393c02fa2b2 Remove `Warning:` (Prayank) Pull request description: Reason: I noticed that `Warning` is printed 2 times in `-getinfo` while reviewing https://github.com/bitcoin/bitcoin/pull/21832#issuecomment-851004943 Same string is used for GUI, log and stderr. If we need to add `Warning:` in GUI or other place we can always prepend to this string. CLI: ``` Warnings: Unknown new rules activated (versionbit 28) ``` GUI: ![image](https://user-images.githubusercontent.com/13405205/120110401-e36ab180-c18a-11eb-8031-4d52287dc263.png) ACKs for top commit: MarcoFalke: review ACK 6d7e46ce23217da53ff52f535879c393c02fa2b2 Tree-SHA512: 25760cf6d850f6c2216d651fa46574d2d21a9d58f4577ecb58f9566ea8cd07bfcd6679bb8a1f53575e441b02d295306f492c0c99a48c909e60e5d977ec1861f6
2021-06-12GUI: Add keyboard shortcuts for other context menusLuke Dashjr
2021-06-12GUI: Restore keyboard shortcuts for context menu entriesLuke Dashjr
This partially reverts f385ad765174afb02e60900581612a19c143cf83.
2021-06-12Merge bitcoin/bitcoin#22156: Allow tr() import only when Taproot is activeW. J. van der Laan
fbf485c9b2bf1d056bfea77345a15cf56a9cd786 Allow tr() import only when Taproot is active (Andrew Chow) Pull request description: To avoid issues around fund loss, only allow descriptor wallets to import `tr()` descriptors after taproot has activated. ACKs for top commit: sipa: utACK fbf485c9b2bf1d056bfea77345a15cf56a9cd786 fjahr: Code review ACK fbf485c9b2bf1d056bfea77345a15cf56a9cd786 laanwj: Code review ACK fbf485c9b2bf1d056bfea77345a15cf56a9cd786 prayank23: utACK https://github.com/bitcoin/bitcoin/pull/22156/commits/fbf485c9b2bf1d056bfea77345a15cf56a9cd786 Tree-SHA512: 83c43376515eea523dbc89bc5a0fde53e54aec492e49a40c2a33d80fc94aac459e232ae07b024b4bd75b58078c8d090bc7a2d69541c5d3d4834d2f4cfc9c8208
2021-06-12build: Fix MSVC linker /SubSystem option for bitcoin-qt.exeHennadii Stepanov
It is still possible to use -printtoconsole option for debug builds.
2021-06-12Merge bitcoin-core/gui#333: refactor: Signal-slot connections cleanupHennadii Stepanov
f507681baa406046c9c3d44be39e99124a2d6e5f qt: Connect WalletView signal to BitcoinGUI slot directly (Hennadii Stepanov) bd50ff9290ea9ec8b482db11314a6fd658373f23 qt: Drop redundant OverviewPage::handleOutOfSyncWarningClicks slot (Hennadii Stepanov) 793f19599b6d9009c2fb11e4c07e0872ff00defe qt: Drop redundant WalletView::requestedSyncWarningInfo slot (Hennadii Stepanov) Pull request description: This PR: - removes slots whose only job is to emit a signal, since we can use the signal as a slot - connects the`WalletView::outOfSyncWarningClicked` signal to the `BitcoinGUI::showModalOverlay` slot directly, and removes intermediate `WalletFrame` slot and signal - split from #29 This PR does not change behavior. ACKs for top commit: Talkless: tACK f507681baa406046c9c3d44be39e99124a2d6e5f, tested on Debian Sid with Qt 5.15.2, no any behavioral changes noticed. promag: Code review ACK f507681baa406046c9c3d44be39e99124a2d6e5f. Tree-SHA512: cd636a7e61881b2cbee84d5425d2107a8e39683b8eb32d79dc9ea942db55d5c1979be2f70da1660eaee5de622d10ed5a92f11fc2351de21b84324b10b23d0c96
2021-06-12Merge bitcoin/bitcoin#22172: doc: update tor.md, release notes with removal ↵W. J. van der Laan
of tor v2 support 2ad034a89095bc1b148bdeeacfa5b75ec23b8a21 doc: update release notes with removal of tor v2 support (Jon Atack) 49938eee9c338cd96e357a0dd51dcce934ceb212 doc: update tor.md with removal of tor v2 support (Jon Atack) Pull request description: Follow-up documentation to #22050 that removed support for Tor version 2 hidden services from Bitcoin Core. ACKs for top commit: laanwj: ACK 2ad034a89095bc1b148bdeeacfa5b75ec23b8a21 Tree-SHA512: 0f13f9d1db7e11f1e3d9967b6d17b8dc3144b3ab3a258c706464c5e6ac5cbcf2ce2db4ea54be9939f05a82ebd1e7f325f50b435f9822c08b4f21ed4ac58de0af
2021-06-12doc: update release notes with removal of tor v2 supportJon Atack
2021-06-12Merge bitcoin/bitcoin#22221: refactor: Pass block reference instead of ↵fanquake
pointer to PeerManagerImpl::BlockRequested fa334b405411dc97fbed12b5e9103510eeb2c9f1 refactor: Pass block reference instead of pointer to PeerManagerImpl::BlockRequested (MarcoFalke) Pull request description: This allows to remove an assert and at the same time make it more obvious that the block is never nullptr. Also, add missing `{}` while touching the function. ACKs for top commit: jnewbery: Code review ACK fa334b405411dc97fbed12b5e9103510eeb2c9f1 mjdietzx: crACK fa334b405411dc97fbed12b5e9103510eeb2c9f1 theStack: Code review ACK fa334b405411dc97fbed12b5e9103510eeb2c9f1 Tree-SHA512: 9733d3e20e048fcb2ac7510eae3539ce8aaa7397bd944a265123f1ffd90e15637cdaad19dba16f76d83f3f0d1888f1b7014c191bb430e410a106c49ca61a725c
2021-06-12Merge bitcoin/bitcoin#18722: addrman: improve performance by using more ↵fanquake
suitable containers a92485b2c250fd18f55d22aa32722bf52ab32bfe addrman: use unordered_map instead of map (Vasil Dimov) Pull request description: `CAddrMan` uses `std::map` internally even though it does not require that the map's elements are sorted. `std::map`'s access time is `O(log(map size))`. `std::unordered_map` is more suitable as it has a `O(1)` access time. This patch lowers the execution times of `CAddrMan`'s methods as follows (as per `src/bench/addrman.cpp`): ``` AddrMan::Add(): -3.5% AddrMan::GetAddr(): -76% AddrMan::Good(): -0.38% AddrMan::Select(): -45% ``` ACKs for top commit: jonatack: ACK a92485b2c250fd18f55d22aa32722bf52ab32bfe achow101: ACK a92485b2c250fd18f55d22aa32722bf52ab32bfe hebasto: re-ACK a92485b2c250fd18f55d22aa32722bf52ab32bfe, only suggested changes and rebased since my [previous](https://github.com/bitcoin/bitcoin/pull/18722#pullrequestreview-666663681) review. Tree-SHA512: d82959a00e6bd68a6c4c5a265dd08849e6602ac3231293b7a3a3b7bf82ab1d3ba77f8ca682919c15c5d601b13e468b8836fcf19595248116635f7a50d02ed603
2021-06-12Merge bitcoin/bitcoin#22214: refactor: Rearrange fillPSBT argumentsfanquake
f47e8028391fbcf44fe1dbf3539f42e4185590fd Rearrange fillPSBT arguments (Russell Yanofsky) Pull request description: Move fillPSBT inout argument before output-only arguments. This is a nice thing to do to keep the interface style [consistent](https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs). But motivation is to work around a current limitation of the libmultiprocess code generator (which figures out order of inout parameters by looking at input list, but more ideally would use the output list). --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102. ACKs for top commit: achow101: ACK f47e8028391fbcf44fe1dbf3539f42e4185590fd theStack: Code-review ACK f47e8028391fbcf44fe1dbf3539f42e4185590fd Tree-SHA512: 1787af3031ff7ed6b519f3b93054d8b257af96a3380a476a6dab0f759329039ecc5d624b785c5c2d14d594fc852dd81c626880c775c691ec9c79b7b3dbcfb257