aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-05-16Add proper thread safety annotation to `CachedTxGetAvailableCredit()`Hennadii Stepanov
2022-05-16Merge bitcoin/bitcoin#23662: rpc: improve `getreceivedby{address,label}` ↵Andrew Chow
performance f336ff7f213564909cf5f9742618cc6ec87600fd rpc: avoid expensive `IsMine` calls in `GetReceived` tally (Sebastian Falbesoner) a7b65af2a4450663d4a20a617c59dac87b34fb36 rpc: avoid scriptPubKey<->CTxDestination conversions in `GetReceived` tally (Sebastian Falbesoner) Pull request description: The RPC calls `getreceivedbyaddress`/`getreceivedbylabel` both use the internal helper function `GetReceived` which was introduced in PR #17579 to deduplicate tallying code. For every wallet-related transaction output, the following unnecessary operations are currently performed in the tally loop, leading to a quite bad performance (as reported in #23645): - converting from CScript -> TxDestination (`ExtractDestination(...)`), converting from TxDestination -> CScript (`CWallet::IsMine(const CTxDestination& dest)`); this can be avoided by directly using output scripts in the search set instead of addresses (first commit) - checking if the iterated output script belongs to the wallet by calling `IsMine`; this can be avoided by only adding addresses to the search set which fulfil `IsMine` in the first place (second commit) ### Benchmark results The functional test [wallet_pr23662.py](https://github.com/theStack/bitcoin/blob/pr23662_benchmarks/test/functional/wallet_pr23662.py) (not part of this PR) creates transactions with 15000 different addresses: - 5000 outputs (500 txs with 10 outputs each) with label set, IsMine set (received) - 5000 outputs (500 txs with 10 outputs each) with label set, IsMine not set (sent) - 5000 outputs (500 txs with 10 outputs each) without label set, IsMine not set (sent) Then, the time is measured for calling `getreceivedbyaddress` and `getreceivedbylabel`, the latter with two variants. Results on my machine: | branch | `getreceivedbyaddress` (single) | `getreceivedbylabel` (single) | `getreceivedbylabel` (10000) | |--------------------|---------------------------------|-------------------------------|------------------------------| | master | 406.13ms | 425.33ms | 446.58ms | | PR (first commit) | 367.18ms | 365.81ms | 426.33ms | | PR (second commit) | 3.96ms | 4.83ms | 339.69ms | Fixes #23645. ACKs for top commit: achow101: ACK f336ff7f213564909cf5f9742618cc6ec87600fd w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/23662/commits/f336ff7f213564909cf5f9742618cc6ec87600fd furszy: Code ACK f336ff7f Tree-SHA512: 9cbf402b9e269713bd3feda9e31719d9dca8a0dfd526de12fd3d561711589195d0c50143432c65dae279c4eab90a4fc3f99e29fbc0452fefe05113e92d129b8f
2022-05-16Merge bitcoin/bitcoin#24962: prevector: enforce is_trivially_copyable_vMacroFake
11e79084845a78e2421ea3abafe0de5a54ca2bde prevector: only allow trivially copyable types (Martin Leitner-Ankerl) Pull request description: prevector uses `memmove` to move around data, that means it can only be used with types that are trivially copyable. That implies that the types are trivially destructible, thus the checks for `is_trivially_destructible` are not needed. ACKs for top commit: w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/24962/commits/11e79084845a78e2421ea3abafe0de5a54ca2bde MarcoFalke: review ACK 11e79084845a78e2421ea3abafe0de5a54ca2bde 🏯 ajtowns: ACK 11e79084845a78e2421ea3abafe0de5a54ca2bde -- code review only Tree-SHA512: cbb4d8bfa095100677874b552d92c324c7d6354fcf7adab2ed52f57bd1793762871798b5288064ed1af2d2903a0ec9dbfec48d99955fc428f18cc28d6840dccc
2022-05-16Merge bitcoin/bitcoin#25125: test: Slim down versionbits_tests.cppfanquake
fae3200bbf2a0f4482ec6f5f2ada9534f6c82709 test: Slim down versionbits_tests.cpp (MacroFake) Pull request description: Seems confusing to spin up a full chainman that isn't even used. Fix that by only spinning up logging. Also, remove the chainman include and comment. ACKs for top commit: fanquake: ACK fae3200bbf2a0f4482ec6f5f2ada9534f6c82709 Tree-SHA512: 35261e9116c0c276f807453db3d635d83916ec2ffd99cf5641f8732736a30a542213096dcec550ef4522d97b3cafe384fdc6068138bc0b577c66fa61256719f8
2022-05-16Merge bitcoin/bitcoin#25095: rpc: Fix implicit-integer-sign-change in gettxoutfanquake
fa347a906685df1d44cafa3e6cc7fdd2ace68ff5 rpc: Fix implicit-integer-sign-change in gettxout (MacroFake) Pull request description: ACKs for top commit: theStack: Code-review ACK fa347a906685df1d44cafa3e6cc7fdd2ace68ff5 Tree-SHA512: 2a1128f714119b6b6cfeb20ee59c4f46404d5a83942253c73de64b0289a7d41e4437cf77d19b1cf623e2dd15fbaa1ec7acd03cc5d6dde41b3c7d06a082073ea1
2022-05-16Merge bitcoin/bitcoin#25109: Strengthen AssertLockNotHeld assertionsMacroFake
436ce0233c276e263dcb441255dc0b881cb39cfb sync.h: strengthen AssertLockNotHeld assertion (Anthony Towns) 7d73f58e9cea8f4b0bc16512983898fddde3d764 Increase threadsafety annotation coverage (Anthony Towns) Pull request description: This changes `AssertLockNotHeld` so that it is annotated with the negative capability for the mutex it refers to. clang applies negative capabilities recursively, so this helps avoid forgetting to annotate functions. Note that this can't reasonably be used for globals, because clang would require every function to be annotated with `EXCLUSIVE_LOCKS_REQUIRED(!g_mutex)` for each global mutex. At present, the only global mutexes that use `AssertLockNotHeld` are `RecursiveMutex` so we treat that as an exception in order to avoid having to add an excessive number of negative annotations. ACKs for top commit: vasild: ACK 436ce0233c276e263dcb441255dc0b881cb39cfb MarcoFalke: review ACK 436ce0233c276e263dcb441255dc0b881cb39cfb 🌺 Tree-SHA512: 5f16d098790a36b5277324d5ee89cdc87033c19b11c7943c2f630a41c2e3998eb39d356a763e857f4d8fefb6c0c02291f720bb6769bcbdf5e2cd765bf266ab8c
2022-05-16Merge bitcoin/bitcoin#20799: net processing: Only support version 2 compact ↵fanquake
blocks a50e34c367608fcec9697893981bfa294a7c08d1 [net processing] Remove redundant nodestate->m_sendcmpct check in MaybeSetPeerAsAnnouncingHeaderAndIDs() (John Newbery) bb985a7b6abee503852c61eec74ca3a29f582815 [net processing] Only relay blocks by cmpctblock and cache for fast relay if segwit is enabled (John Newbery) 3b6bfbce386f61dcbb366f08cfff55c3882f429c [net processing] Rename CNodeState compact block members (John Newbery) d0e97741748aaaad2a89ca42e4898e7f01308b35 [net processing] Tidy up `sendcmpct` processing (John Newbery) 30c3a01874cf51d987a0ae2bb699bf50d82768ff [net processing] fPreferHeaderAndIDs implies fProvidesHeaderAndIDs (John Newbery) b486f721767d07c1e2eaf8deaf96b732b0a858dd [net processing] Remove fWantsCmpctWitness (John Newbery) a45d53cab556505048c387429fd07188e4c40c3d [net processing] Remove fSupportsDesiredCmpctVersion (John Newbery) 25edb2b7bd4c41156fba09d0033a978e362435af [net processing] Simplify `sendcmpct` processing (John Newbery) 42882fc8fc2ef5c58eb963f7f1e852dd43de6c65 [net processing] Only accept `sendcmpct` with version=2 (John Newbery) 16730b64bb4a11995d792f626c8a63318e5eaeeb [net processing] Only advertise support for version 2 compact blocks (John Newbery) cba909eaf938a775a9bd2dd994d06aba175e8713 [net] Stop testing version 1 compact blocks. (John Newbery) Pull request description: Compact blocks are used for efficient relay of blocks, either through High Bandwidth or Low Bandwidth mode. See [BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) for full details. For compact block relay to work, the receiver must have a mempool containing transactions which are likely to be included in the block. The receiver uses these transactions to reconstruct the block from the short transaction ids included in the `cmpctblock` message. Compact blocks are therefore only useful for relaying blocks at or near the tip of the block chain. For older blocks, the recipient won't have the transactions in their mempool and so would need to request them using a `getblocktxn` message. In such cases, just requesting the full block is more efficient. BIP 152 supports two versions: version 1 (without witnesses) and version 2 (with witnesses). Version 2 is required to reconstruct segwit blocks. Segwit was activated in August 2017, and providing non-witness blocks to peers is no longer useful. Since the witnesses are not included, the peer would not be able to fully validate all the consensus rules on the provided block. Therefore, stop supporting version 1 compact blocks. Ignore `sendcmpct` messages with version=1, and don't advertise support by sending `sendcmpct` with version=1. Only send `sendcmpct` to peers with `NODE_WITNESS`. Respond to all requests for compact blocks or blocktxns with witness-serialized blocks and transactions. ACKs for top commit: dergoegge: ACK a50e34c367608fcec9697893981bfa294a7c08d1 - Only changes since my last review were a rebase and some nits. MarcoFalke: re-ACK a50e34c367608fcec9697893981bfa294a7c08d after rebase 👓 Tree-SHA512: 8ad73acaa374d56ee9f28ca0a9d64b8630793d22fc8c942a1ee15551d4d80f76f3ba937682f85f22ec8ca82efae98a92de75a7e2f5a97499d8f9c7e4f2833c86
2022-05-16Merge bitcoin/bitcoin#24640: Bugfix: RPC/blockchain: Correct description of ↵MacroFake
getblockchaininfo's pruneheight result 06822f86545a0e946fdc266c57955f98d163a8bc Bugfix: RPC/blockchain: Correct description of getblockchaininfo's pruneheight result (Luke Dashjr) Pull request description: It is possible that lower blocks are complete due to being stored in the same file as blocks not yet eligible for pruning. Not really satisfied with this new description, so suggestions for better phasing welcome :) (Split out of #24629) ACKs for top commit: theStack: Code-review ACK 06822f86545a0e946fdc266c57955f98d163a8bc Tree-SHA512: 755a5a40d065ad77f4ac2c19c0b3502eceb3162034823ee7ce1668100d97e8a2bfb822ac381feb7afd13e653cd08a81d5fa505575531757457d6d22c909a6510
2022-05-16Merge bitcoin/bitcoin#25067: validationinterface: make MainSignalsInstance() ↵MacroFake
a class, drop unused forward declarations ca1ac1f0e0fbabbe97666aca94024afb8104da06 scripted-diff: Rename MainSignalsInstance() class to MainSignalsImpl() (Jon Atack) 2aaec2352d14753e1f2d4bf4b11bbe6ad42edf5c refactor: remove unused forward declarations in validationinterface.h (Jon Atack) 23854f84024c292164ce49b3fefee2a9b4fe0831 refactor: make MainSignalsInstance() a class (Jon Atack) Pull request description: Make MainSignalsInstance a class, rename it to MainSignalsImpl, use Doxygen documentation for it, and remove no longer used forward declarations in src/validationinterface.h. ---- MainSignalsInstance was created in 3a19fed9db5 and originally was a collection of boost::signals methods moved to validationinterface.cpp, in order to no longer need to include boost/signals in validationinterface.h. MainSignalsInstance then evolved in d6815a23131 to become class-like: - [C.8: Use class rather than struct if any member is non-public](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-class) - [C.2: Use class if the class has an invariant; use struct if the data members can vary independently](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c2-use-class-if-the-class-has-an-invariant-use-struct-if-the-data-members-can-vary-independently) - A class has the advantage of default private access, as opposed to public for a struct. ACKs for top commit: furszy: Code ACK ca1ac1f promag: Code review ACK ca1ac1f0e0fbabbe97666aca94024afb8104da06. danielabrozzoni: Code review ACK ca1ac1f0e0fbabbe97666aca94024afb8104da06 Tree-SHA512: 25f85e2b582fe8c269e6cf384a4aa29350b97ea6477edf3c63591e4f68a97364f7fb2fc4ad2764f61ff86b27353e31d2f12eed7a23368a247e4cf271c7e133ea
2022-05-15[net processing] Remove redundant nodestate->m_sendcmpct check in ↵John Newbery
MaybeSetPeerAsAnnouncingHeaderAndIDs()
2022-05-15[net processing] Only relay blocks by cmpctblock and cache for fast relay if ↵John Newbery
segwit is enabled This introduces an early exit in PeerManagerImpl::NewPoWValidBlock() if segwit has not been activated for the block. This means that we won't cache the block/compact block for fast relay and won't relay the cmpctblock immediately to peers that have requested hb compact blocks. This is fine because any block where segwit is not yet activated is buried deep in the chain, and so compact block relay will not be effective. It's ok not to cache the block/compact block for fast relay for the same reason - the block must be very deeply buried in the block chain. ProcessBlockAvailability() also won't get called for all nodes. This is also fine, since that function only updates hashLastUnknownBlock and pindexBestKnownBlock, and is called early in every SendMessages() call.
2022-05-15[net processing] Rename CNodeState compact block membersJohn Newbery
fPreferHeaderAndIDs -> m_requested_hb_cmpctblocks fProvidesHeaderAndIDs -> m_provides_cmpctblocks
2022-05-15[net processing] Tidy up `sendcmpct` processingJohn Newbery
- use better local variable names - drop unnecessary if statements
2022-05-15[net processing] fPreferHeaderAndIDs implies fProvidesHeaderAndIDsJohn Newbery
Remove all if(fProvidesHeaderAndIDs) conditionals inside if(fPreferHeaderAndIDs) conditionals.
2022-05-15[net processing] Remove fWantsCmpctWitnessJohn Newbery
It is now completely redundant with fProvidesHeadersAndIDs.
2022-05-15[net processing] Remove fSupportsDesiredCmpctVersionJohn Newbery
It is now completely redundant with fProvidesHeadersAndIDs.
2022-05-15[net processing] Simplify `sendcmpct` processingJohn Newbery
nCMPCTBLOCKVersion must always be 2 when processing.
2022-05-15[net processing] Only accept `sendcmpct` with version=2John Newbery
Subsequent commits will remove support for other versions of compact blocks. Add a test that a received `sendcmpct` message with version = 1 is ignored.
2022-05-15[net processing] Only advertise support for version 2 compact blocksJohn Newbery
Subsequent commits will remove support.
2022-05-13test: Slim down versionbits_tests.cppMacroFake
2022-05-13rpc: Fix implicit-integer-sign-change in gettxoutMacroFake
2022-05-13Merge bitcoin/bitcoin#25113: Bump univalue subtreefanquake
f403531f97cb80930e9a8e70a6f0dbde4cc8a866 Squashed 'src/univalue/' changes from a44caf65fe..6c19d050a9 (MacroFake) Pull request description: Only change is some header-shuffling and adding `getInt`. ACKs for top commit: fanquake: ACK fac2c796cb4137e025a4a783f7460e5db9c74bc2 Tree-SHA512: 8bdf7d88ce06f0851f99f30c30fc926a13b79ae72bcebd5e170ed0e1d882b184d9279f96488e234fbe560036e31cb180aa1e5666aebd9833b9a119c6b214fa30
2022-05-13Merge bitcoin/bitcoin#24595: deploymentstatus: move g_versionbitscache ↵MacroFake
global to ChainstateManager bb5c24b120a3ac7df367a1c5d9b075ca564efb5f validation: move g_versionbitscache into ChainstateManager (Anthony Towns) eca22c726ac48b4216bb68cc0f0bbd655c43ac12 test/versionbits: make versionbitscache a parameter (Anthony Towns) d603f1d8a7cdc0a158ed80ade8a843b61b6ad08e deploymentstatus: make versionbitscache a parameter (Anthony Towns) 78adef17536edef833a0bfca06b61ce28120e486 refactor: use chainman instead of chainParams for DeploymentActive* (Anthony Towns) deffe0df6c36225bada18603b5a840139f030f2c deploymentstatus: allow chainman in place of consensusParams (Anthony Towns) eaa2e3f25cefbd1b9a1214102f88dbfa8109d244 validation: move UpdateUncommittedBlockStructures and GenerateCoinbaseCommitment into ChainstateManager (Anthony Towns) 5c67e84d37d452e9186a6357e5405fabeff241c7 validation: replace ::Params() calls with chainstate/chainman member (Anthony Towns) 38860f93b680f152fc6fc3d9ae574a4c0659e775 validation: remove redundant CChainParams params from ChainstateManager methods (Anthony Towns) 69675ea4e73dcf5e9dd0f94802bd3463e4262081 validation: add CChainParams to ChainstateManager (Anthony Towns) Pull request description: Gives `ChainstateManager` a reference to the `CChainParams` its working on, and simplifies some of the functions that would otherwise take that as a parameter. Removes the `g_versionbitscache` global by moving it into `ChainstateManager`. ACKs for top commit: dongcarl: reACK bb5c24b120a3ac7df367a1c5d9b075ca564efb5f MarcoFalke: review ACK bb5c24b120a3ac7df367a1c5d9b075ca564efb5f 📙 Tree-SHA512: 3fa74905e5df561e3e74bb0b8fce6085c5311e6633e7d74c0fb0c82a907f5bbb1fd4ebc5d11d4f0b1c019bb51eabb9f6e4bcc4652a696d36a5878c807b85f121
2022-05-13Merge bitcoin/bitcoin#25119: net, refactor: move StartExtraBlockRelayPeers() ↵MacroFake
from header to implementation 51ec96b904f349056e805c6b2a6de5257e8fbdee refactor: move StartExtraBlockRelayPeers from header to implementation (Jon Atack) Pull request description: where all the other logging actions in src/net.{h,cpp} are located. StartExtraBlockRelayPeers() does not appear to be a hotspot that needs to be inlined for performance, as it is called from CheckForStaleTipAndEvictPeers(), called in turn from StartScheduledTasks() with a scheduleEvery delta of 45 seconds, called at the end of AppInitMain() on bitcoind startup. This allows dropping `#include <logging.h>` from net.h, which can improve compile time/speed. Currently, none of the other includes in net.h use logging.h, except src/sync.h if DEBUG_LOCKCONTENTION is defined. ACKs for top commit: LarryRuane: ACK 51ec96b904f349056e805c6b2a6de5257e8fbdee theStack: ACK 51ec96b904f349056e805c6b2a6de5257e8fbdee Tree-SHA512: 69b2c09163c48bfcb43355af0aa52ee7dd81efc755a7aa6a10f5e400b5e14109484437960a62a1cfac2524c2cfae981fee082846b19526b540ef5b86be97f0fe
2022-05-12refactor: move StartExtraBlockRelayPeers from header to implementationJon Atack
where all the other logging actions in src/net.{h,cpp} are located. StartExtraBlockRelayPeers() does not appear to be a hotspot that needs to be inlined for performance, as it is called from CheckForStaleTipAndEvictPeers(), called in turn from StartScheduledTasks() with a scheduleEvery delta of 45 seconds, called at the end of AppInitMain() on bitcoind startup. This allows dropping `#include <logging.h>` from net.h, which can improve compile time/speed. Currently, none of the other includes in net.h use logging.h, except src/sync.h if DEBUG_LOCKCONTENTION is defined.
2022-05-12scripted-diff: replace non-standard fixed width integer types (`u_int`...` ↵Sebastian Falbesoner
-> `uint`...) -BEGIN VERIFY SCRIPT- sed -i 's/u_int/uint/g' $(git grep -l u_int) -END VERIFY SCRIPT-
2022-05-12Bump univalue subtreeMacroFake
2022-05-12Merge bitcoin/bitcoin#25102: Remove unused GetTimeSecondsMacroFake
fab9e8a29c2cdeab6cf1ae7c1fc0e0a3af783b17 Remove unused GetTimeSeconds (MacroFake) Pull request description: Seems confusing to have this helper when it is possible to get the system time in a type-safe way by simply calling `std::chrono::system_clock::now` (C++11). This patch replaces `GetTimeSeconds` and removes it: * in `bitcoin-cli.cpp` by `system_clock` * in `test/fuzz/fuzz.cpp` by `steady_clock` ACKs for top commit: laanwj: Code review ACK fab9e8a29c2cdeab6cf1ae7c1fc0e0a3af783b17 naumenkogs: ACK fab9e8a29c2cdeab6cf1ae7c1fc0e0a3af783b17 Tree-SHA512: 517e300b0baf271cfbeebd4a0838871acbea9360f9dd23572a751335c20c1ba261b1b5ee0aec8a36abd20c94fab83ce94f46042745279aca1f0ca2f885a03b6e
2022-05-12Merge bitcoin/bitcoin#24925: refactor: make GetRand a template, remove ↵MacroFake
GetRandInt ab1ea29ba1b8379a21fabd3dc859552c470a6421 refactor: make GetRand a template, remove GetRandInt (pasta) Pull request description: makes GetRand a template for which any integral type can be used, where the default behavior is to return a random integral up to the max of the integral unless a max is provided. This simplifies a lot of code from GetRand(std::numeric_limits<uint64_t>::max() -> GetRand<uint64_t>() ACKs for top commit: laanwj: Code review ACK ab1ea29ba1b8379a21fabd3dc859552c470a6421 Tree-SHA512: db5082a0e21783389f1be898ae73e097b31ab48cab1a2c0e29348a4adeb545d4098193aa72a547c6baa6e8205699aafec38d6a27b3d65522fb3246f91b4daae9
2022-05-12sync.h: strengthen AssertLockNotHeld assertionAnthony Towns
2022-05-12Increase threadsafety annotation coverageAnthony Towns
2022-05-11Merge bitcoin/bitcoin#25100: Switch scheduler to steady_clockMacroFake
fa9051642269f62f560af3f323fbf36cb7b58082 Switch scheduler to steady_clock (MacroFake) Pull request description: There is already `mockscheduler`, so it seems brittle, confusing and redundant to be able to mock the scheduler by adjusting the system clock. ACKs for top commit: laanwj: Code review ACK fa9051642269f62f560af3f323fbf36cb7b58082 w0xlt: crACK https://github.com/bitcoin/bitcoin/pull/25100/commits/fa9051642269f62f560af3f323fbf36cb7b58082 Tree-SHA512: 60e99065ffb881a9fb25a346d311d99424fbc72a3b636c94b5f5c17ed6373c40f358a9b27825c518d12968c033e6cfd3c62d2b62cacdddc44a0b5b74f6c1a7ae
2022-05-11Merge bitcoin/bitcoin#25104: wallet: Change log interval to use `steady_clock`MacroFake
bdc6881e2f796f4a9a5873826219e24f17a96a7c wallet: Change log interval to use `steady_clock` (w0xlt) Pull request description: This refactors the log interval variables to use `steady_clock` as it is best suitable for measuring intervals. ACKs for top commit: laanwj: This makes sense. Code review ACK bdc6881e2f796f4a9a5873826219e24f17a96a7c dunxen: Code review ACK bdc6881 Tree-SHA512: 738b4aa45cef01df77102320f83096a0a7d0c63d7fcf098a8c0ab16b29453a87dc789c110105590e1e215d03499db1d889a94f336dcb385b6883c8364c9d39b7
2022-05-11Remove unused GetTimeSecondsMacroFake
2022-05-11rpc: check `fopen` return code in dumptxoutsetSebastian Falbesoner
This change improves the usability of the `dumptxoutset` RPC in two ways, in the case that an invalid path is passed: 1. return from the RPC immediately, rather then when the file is first tried to be written (which is _after_ calculating the UTXO set hash) 2. return a proper return code and error message instead of the cryptic "CAutoFile::operator<<: file handle is nullptr: unspecified iostream_category error" (-1)
2022-05-10wallet: Change log interval to use `steady_clock`w0xlt
This refactors the log interval variables to use `steady_clock` as it is best suitable for measuring intervals.
2022-05-10Switch scheduler to steady_clockMacroFake
2022-05-10Merge bitcoin/bitcoin#24921: Add time helpers for std::chrono::steady_clock ↵MacroFake
and FastRandomContext::rand_uniform_delay fa4fb8d98b7e8e5ea2db35bf239fa7f248da5d8e random: Add FastRandomContext::rand_uniform_delay (MarcoFalke) faa5c62967174f1dd66e8a4ba61ab29c867cf450 Add time helpers for std::chrono::steady_clock (MarcoFalke) Pull request description: A steady clock can be used in the future for the scheduler, for example. A random uniform delay applied to a time point can be used in the future for time points passed to the scheduler, or delays in net processing. Currently they are unused outside of tests, but if they turn out unused in the future (unlikely), they can trivially be removed again. I am splitting them out, so that several branches/pulls can build on top of them without duplicating the commits. ACKs for top commit: ajtowns: ACK fa4fb8d98b7e8e5ea2db35bf239fa7f248da5d8e Tree-SHA512: 2c37174468fe84b1cdf2a032f458706df44b99a5f99062417bb42078b6f69e2f1738d20c21cd9386ca5a35f3bc0583e547ba40168c66f6aa42f700ba35dd95d4
2022-05-10Merge bitcoin/bitcoin#25079: index: Change sync variables to use ↵MacroFake
`std::chrono::steady_clock` 92b35aba224ad4440f3ea6c01c841596a6a3d6f4 index, refactor: Change sync variables to use `std::chrono::steady_clock` (w0xlt) Pull request description: This PR refactors the sync variables to use `std::chrono::steady_clock` as it is best suitable for measuring intervals. ACKs for top commit: jonatack: utACK 92b35aba224ad4440f3ea6c01c841596a6a3d6f4 ajtowns: ACK 92b35aba224ad4440f3ea6c01c841596a6a3d6f4 - code review only Tree-SHA512: cd4bafde47b30beb88c0aac247e41b4dced2ff2845c67a7043619da058dcff4f84374a7c704a698f3055c888d076d25503c2f38ace8fbc5456f624e0efe1e188
2022-05-10validation: move g_versionbitscache into ChainstateManagerAnthony Towns
2022-05-10test/versionbits: make versionbitscache a parameterAnthony Towns
2022-05-10deploymentstatus: make versionbitscache a parameterAnthony Towns
2022-05-10refactor: use chainman instead of chainParams for DeploymentActive*Anthony Towns
2022-05-10deploymentstatus: allow chainman in place of consensusParamsAnthony Towns
2022-05-10validation: move UpdateUncommittedBlockStructures and ↵Anthony Towns
GenerateCoinbaseCommitment into ChainstateManager
2022-05-10validation: replace ::Params() calls with chainstate/chainman memberAnthony Towns
2022-05-10validation: remove redundant CChainParams params from ChainstateManager methodsAnthony Towns
2022-05-10validation: add CChainParams to ChainstateManagerAnthony Towns
2022-05-09Merge bitcoin-core/gui#590: refactor: Declare `WalletModel` member functions ↵Hennadii Stepanov
with `const` f70ee34c71aeeb814fe65a69952343dccdb7b906 qt, refactor: Declare `WalletModel` member functions with `const` (Hennadii Stepanov) Pull request description: After bitcoin/bitcoin#12830 the `WalletModel` class has two member functions: https://github.com/bitcoin-core/gui/blob/be7a5f2fc400e7a3ef72dedbdcf49dd6c96d4f9e/src/qt/walletmodel.h#L81 and https://github.com/bitcoin-core/gui/blob/be7a5f2fc400e7a3ef72dedbdcf49dd6c96d4f9e/src/qt/walletmodel.h#L154 This PR drops the former one as redundant, and declares `WalletModel` member functions with the `const` qualifier where appropriate. ACKs for top commit: promag: Code review ACK f70ee34c71aeeb814fe65a69952343dccdb7b906. kristapsk: cr ACK f70ee34c71aeeb814fe65a69952343dccdb7b906 w0xlt: Code Review ACK https://github.com/bitcoin-core/gui/pull/590/commits/f70ee34c71aeeb814fe65a69952343dccdb7b906 Tree-SHA512: 43e6661822c667229ea860fb94c2e3154c33773dbd9fca1f6f76cc31c5875a1a0e8caa65ddfc20dec2a43e29e7b2469b3b6fa148fe7ec000ded518b4958b2b38
2022-05-09Merge bitcoin-core/gui#591: test: Add tests for `tableView` in ↵Hennadii Stepanov
`AddressBookPage` dialog 15069130c6ca5273f3a593a404f60f11caa7d950 qt, test: Add tests for `tableView` in `AddressBookPage` dialog (Hennadii Stepanov) edae3ab6999ee9e6efabd8403d31e9bd7c84f8a3 qt: No need to force Qt::QueuedConnection for NotifyAddressBookChanged (Hennadii Stepanov) Pull request description: This PR is a prerequisite for more thorough testing of filtering in the `AddressBookPage` class in context of bitcoin-core/gui#578 and bitcoin-core/gui#585. Required for bitcoin-core/gui#592. ACKs for top commit: promag: Code review ACK 15069130c6ca5273f3a593a404f60f11caa7d950. Tree-SHA512: 86986d47606cbd54d813436c7afb21894e2200b6d3042a7aa0b5e84821c765bd68b14ad38a445069891ab33f2d7bcd4933b8373e14e9afb0c91f1a6ddf4da740