aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-02-22Merge #79: Embed monospaced fontWladimir J. van der Laan
67f26319a0ca7e34e3db17d9330133622a40de09 gui: Add monospaced font settings (Hennadii Stepanov) 22e0114d055b0ac6cdc47af2968b5dc742ba055a qt: Choose monospaced font in C++ code rather in `*.ui` file (Hennadii Stepanov) 623de12d040af89ff7c25de6eb0a19c67179dc5f qt: Make GUIUtil::fixedPitchFont aware of embedded font (Hennadii Stepanov) 89e421918ee8b9c8439317f747e5c37f0733d94b gui: Add Roboto Mono font (Hennadii Stepanov) Pull request description: Qt does not guarantee that the actual applied font matches to the requested one. It was noted (https://github.com/bitcoin/bitcoin/pull/16432#issuecomment-514486077): > the monospace font looks a bit weird no macOS ... because it is _not_ monospaced. Also some discrepancies I've noted on Windows while testing Qt 5.15 ([#19716](https://github.com/bitcoin/bitcoin/pull/19716)). Of course, we could check the actual font with `QFontInfo`, and try to choose another font. But this PR suggests to just embed a monospaced font, and get the GUI look (partially) independent from a platform. [Roboto Mono](https://fonts.google.com/specimen/Roboto+Mono) was chosen after discussion with Bitcoin Design community, and due to its [Apache License, Version 2.0](https://fonts.google.com/specimen/Roboto+Mono#license). Changes are scoped to the Overview page only. --- Screenshots on macOS 10.15.6 (images are simulated by code patching): - master (ca30d34cf94b7797272ef1920ca4b48716e7f999) ![Screenshot from 2020-09-03 14-10-03](https://user-images.githubusercontent.com/32963518/92107902-30357d80-edef-11ea-8a4f-b4c758eebf66.png) - this PR (3fdd5b6bd17a679d6e3876682266092159c52d59) ![Screenshot from 2020-09-03 15-41-36](https://user-images.githubusercontent.com/32963518/92116277-4b5aba00-edfc-11ea-8cb9-22fc44460bfb.png) --- More screenshots added after https://github.com/bitcoin-core/gui/pull/79#issuecomment-782909149: - Linux Mint 20.1 + Cinnamon DE ![DeepinScreenshot_select-area_20210221205410](https://user-images.githubusercontent.com/32963518/108635739-b327be80-7489-11eb-8851-ac89f61199ee.png) - Windows 10 (with depends) ![DeepinScreenshot_select-area_20210221205056](https://user-images.githubusercontent.com/32963518/108635741-b6bb4580-7489-11eb-8b6b-66be5551eb8c.png) - macOS Big Sur (with depends) ![DeepinScreenshot_select-area_20210221202917](https://user-images.githubusercontent.com/32963518/108635746-bd49bd00-7489-11eb-8cd2-cf4bb2273a6d.png) ACKs for top commit: laanwj: Tested ACK 67f26319a0ca7e34e3db17d9330133622a40de09 Tree-SHA512: a59775570b8ce314669ede50a0b69f53e8a47a41e7eea428835013240f0ce9afcff6e4c258895455b56806417ed877e5b7a9522f1904e95a5f435db8ccf6078c
2021-02-22Merge #21202: [validation] Two small clang lock annotation improvementsMarcoFalke
25c57d640992255ed67964a44b17afbfd4bed0cf [doc] Add a note about where lock annotations should go. (Amiti Uttarwar) ad5f01b96045f304b6cf9100879592b835c49c40 [validation] Move the lock annotation from function definition to declaration (Amiti Uttarwar) Pull request description: Based on reviewing #21188 the first commit switches the lock annotations on `CheckInputScripts` to be on the function declaration instead of on the function definition. this ensures that all call sites are checked, not just ones that come after the definition. the second commit adds a note to the developer-notes section to clarify where the annotations should be applied. ACKs for top commit: MarcoFalke: ACK 25c57d640992255ed67964a44b17afbfd4bed0cf πŸ₯˜ promag: Code review ACK 25c57d640992255ed67964a44b17afbfd4bed0cf. Tree-SHA512: 61b6ef856bf6c6016d535fbdd19daf57b9e59fe54a1f30d47282a071b9b9d60b2466b044ee57929e0320cb1bdef52e7a1687cacaa27031bbc43d058ffffe22ba
2021-02-22Merge #20845: net: Log to net debug in MaybeDiscourageAndDisconnect except ↡MarcoFalke
for noban and manual peers fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 net: Log to net debug in MaybeDiscourageAndDisconnect except for noban and manual peers (MarcoFalke) Pull request description: The goal is to avoid local peers (e.g. untrusted peers on the local network or inbound onion peers via a local onion proxy) filling the debug log (and thus the disk). ACKs for top commit: practicalswift: ACK fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 vasild: ACK fa55159b9ede4a915f8ef9e5b90e3e99eadedf91 Tree-SHA512: de233bf57334580f9b91f369fafd131d71c5ae25db25b09cc8fa8cbf34c0648f083c52260a6a912238751467e3c3c5f5d2309c145710753058d44a0003f88f4f
2021-02-22Merge bitcoin-core/gui#211: qt: Remove Transactionview Edit Label ActionMarcoFalke
8f9644890a167a093d95ecef1f12a20dce1bc581 qt: Remove Transactionview Edit Label Action (Jarol Rodriguez) Pull request description: This PR removes the `Edit Label` action from the `transactionview` context menu. Since the `Edit Label` action will no longer be utilized in the `transactionview`, the `Edit Label` function logic is also removed. | Master | PR | | ----------- | ----------- | |<img width="248" alt="Screen Shot 2021-02-17 at 8 34 34 PM" src="https://user-images.githubusercontent.com/23396902/108292189-9b86c800-7161-11eb-9e80-6238523bc27e.png">|<img width="248" alt="Screen Shot 2021-02-17 at 8 35 10 PM" src="https://user-images.githubusercontent.com/23396902/108292204-a17ca900-7161-11eb-8582-7f33d3e2ba8f.png">| Among the context menu actions for each transaction in the `transactionview` is the `Edit Label` action. While all other actions apply directly to the selected transaction, the `Edit Label` action applies to the selected transaction's address. As documented in issue #209 and [#1168](https://github.com/bitcoin/bitcoin/issues/1168) , this is an "unfortunate" placement for such an action. The current placement creates a confusing UX scenario where the outcome of the action is ambiguous. **Example of Ambiguous Behavior:** The context menu gives the wrong impression that the `Edit Label` action will edit a `Label` for the specific transaction that has been right-clicked on. This impression can be because all other actions in this menu will relate to the specific transaction and the misconception between `Comment` and `Label`. <img width="1062" alt="editlabel-start" src="https://user-images.githubusercontent.com/23396902/108296385-6da48200-7167-11eb-89f0-b21ccc58f6f4.png"> Let's say I wanted to give the transaction selected in the screenshot above a comment of "2-17[17:43]". Given all the context clues, it will be reasonable to assume that the `Edit Label` function will give a label to this transaction. Instead, it edits the `Label` for the address behind this transaction. Thus, changing the `Label` for all transactions associated with this address. <img width="971" alt="editlabel-end" src="https://user-images.githubusercontent.com/23396902/108297179-e35d1d80-7168-11eb-86a9-0d2796c51829.png"> **Maintaining `Edit Label` Functionality:** The action of Editing a Label should instead be reserved for the respective address tables of the `Send` and `Receive` tabs. As documented in this [comment](https://github.com/bitcoin-core/gui/issues/209#issuecomment-780922101), `Edit Label` is currently implemented in the `Send` tab and is missing in the `Receive` tab. A follow-up PR can add the `Edit Label` functionality to the `Receive` tab. ACKs for top commit: MarcoFalke: review ACK 8f9644890a167a093d95ecef1f12a20dce1bc581 Talkless: tACK 8f9644890a167a093d95ecef1f12a20dce1bc581, tested on Debian Sid. Tree-SHA512: 70bbcc8be3364b0d4f476a9760aa14ad1ad1f53b0b130ce0ffe75190d76c386e6e26c530c0a55d1742402fe2b45c68a2af6dbfaf58ee9909ad93b06f0b6559d4
2021-02-22Merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, ↡MarcoFalke
from} in peer details 142807af8b82e2372a03df893c50df4f4a96aca4 gui: display BIP152 high bandwidth relay in peer details (Jon Atack) 9476886353dffb730dcb75799f2bd5e143425795 gui: display fRelayTxes in peer details (Jon Atack) Pull request description: This pull adds two fields to the peer details, "Wants Tx Relay" (fRelayTxes) and "High Bandwidth" (bip152_highbandwidth to/from). See the added tooltips for more info. ACKs for top commit: MarcoFalke: review ACK 142807af8b82e2372a03df893c50df4f4a96aca4 jarolrod: ACK 142807af8b82e2372a03df893c50df4f4a96aca4 Tree-SHA512: 956c7fa54c9c2ea76ee879d370711be0bed4af05484a17d35a1dd77713ed34ff441ed3957d0ef3a7ca7cf59a2f5d898be49b12af609a16b3e3cbfc4a1ba8f54e
2021-02-22Merge bitcoin-core/gui#205: Save/restore TransactionView and ↡MarcoFalke
recentRequestsView tables column sizes 964885d04801c6ab77ce4705cff01c9d83bc3ed8 qt: Save/restore recentRequestsView table column sizes (Hennadii Stepanov) f5c8093e778069f4930a84452398c339aad58e79 qt: Move recentRequestsView properties settings to constructor (Hennadii Stepanov) 9c5f4f2169cc4494d3e22fd62afe40e000a9eace qt: Save/restore TransactionView table column sizes (Hennadii Stepanov) 788205c3f783fb20bfdfd403be6befba149772ca qt: Move transactionView properties settings to constructor (Hennadii Stepanov) ecdbaf71c0e1a4363e7eb019dabeb0018522ef70 qt, refactor: Drop intermediate assignment (Hennadii Stepanov) Pull request description: Save/restore TransactionView and recentRequestsView tables column sizes. Sorting order is not saved/restored intentionally. Based on #204 (the first commit). ACKs for top commit: jarolrod: ACK 964885d04801c6ab77ce4705cff01c9d83bc3ed8, tested on macOS 11.1 Qt 5.15.2 Talkless: tACK 964885d04801c6ab77ce4705cff01c9d83bc3ed8, tested on Debian Sid, saving/restoring and resetting (with `-resetguisettings`) works as expected. Tree-SHA512: c24e41bf4d95bb33dce16e9a0b952ffd0912e95f4d2a1bc5292fcf5a27100e70fea73433c4ff246d05b174fc23a7b6de1790a2e8b990a9089e4deca79a00dedc
2021-02-22Merge bitcoin-core/gui#204: Drop buggy TableViewLastColumnResizingFixer classMarcoFalke
3913d1e8c1f604bdd622d5e81e5077ef52b30466 qt: Drop buggy TableViewLastColumnResizingFixer class (Hennadii Stepanov) Pull request description: In Qt 5 the last column resizing with dragging its left edge works out-of-the-box. The current `TableViewLastColumnResizingFixer` implementation could put the last column content out of the view port and confuse a user: ![Screenshot from 2021-01-31 18-04-32](https://user-images.githubusercontent.com/32963518/106390022-fd6bd180-63ee-11eb-9216-6e5117f8dc96.png) Historical context: - https://github.com/bitcoin/bitcoin/pull/2862 - https://github.com/bitcoin/bitcoin/pull/3626 - https://github.com/bitcoin/bitcoin/pull/3738 - https://github.com/bitcoin/bitcoin/pull/3920 #205 is a nice addition. ACKs for top commit: jarolrod: ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on macOS 11.1 Qt 5.15.2 Talkless: tACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on Debian Sid. Can confirm that behavior in previous commit does not produce scroll bar, last column gets "hidden". This PR makes clear that there's more to see in the view. promag: Tested ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466 on macos. Tree-SHA512: 12582dfce54bb1db3d9934ae092e305d32e9760cc99b0265322e161fa7f54b7d6fb6cefedf700783f767d5c3a56a8545c8d2f5ade66596c4e67b8a5287063e8a
2021-02-22Merge bitcoin-core/gui#202: peers-tab: bug fix right panel toggleMarcoFalke
8353e8cecc3e34a8699b53849df0adab622c1c14 peers-tab: bug fix right panel toggle (randymcmillan) Pull request description: Initial Presentation: ![Screen Shot 2021-01-28 at 8 36 15 PM](https://user-images.githubusercontent.com/152159/106220159-e2a81b80-61a8-11eb-84e9-f9b44375c9a1.png) When node row selected - panel is presented: ![Screen Shot 2021-01-28 at 8 36 22 PM](https://user-images.githubusercontent.com/152159/106220185-eb98ed00-61a8-11eb-9467-6a762941902d.png) When network disabled - right panel is hidden: ![Screen Shot 2021-01-28 at 8 36 32 PM](https://user-images.githubusercontent.com/152159/106220235-0a977f00-61a9-11eb-8a10-f31e4312ed31.png) ACKs for top commit: jarolrod: ACK 8353e8cecc3e34a8699b53849df0adab622c1c14 jonatack: ACK 8353e8cecc3e34a8699b53849df0adab622c1c14 tested rebased on current master. Behavior is initially a bit surprising but this would allow more columns to be added to the peers tab window. Verified that selecting more than one peer, clicking on a column header, or running `disconnectnode "" <currently-selected-peer-id>` in the console (or on the CLI with the `-server` startup option) returns the window to its full size. If this is merged, it might be nice to have an obvious way to close the details area like a clickable "close this" icon in the upper left corner of the area. Talkless: tACK 8353e8cecc3e34a8699b53849df0adab622c1c14, tested on Debian Sid. Made `bitcoind` connect to `bitcoin-qt` with the PR changes, and after I quit the `bitcoind` instance, right panel do disappear, compared to the previous commit where it didn't. Tree-SHA512: 8fc156f40bdd61e3ba8db333c729a2a07fd5f0fd1eed56f2fd2aa5ae5864756f8ab6fad74ae2fb0552ee7518b6d489f5800709e6c80c6f31f61fd8ce21cece5f
2021-02-22Merge bitcoin-core/gui#179: Add `Type` column to peers window, update peer ↡MarcoFalke
details name/tooltip be4cf4832f117ab5f97e1367f7bdcb5361de0dae gui: update to "Direction/Type" peer details name/tooltip (Jon Atack) 151888383a772fd5be626b6ed25af183f0395a41 gui: add "Type" column to Peers main window (Jon Atack) 6fc72bd6f030c8b49e8b9f68188413766a239d73 gui: allow ConnectionTypeToQString to prepend direction optionally (Jon Atack) Pull request description: This pull: - adds a sortable `Type` column to the GUI Peers tab window - updates the peer details row to `Direction/Type`, so the `Type` column without a direction makes sense (the tooltip is also updated) ![Screenshot from 2021-02-06 22-53-11](https://user-images.githubusercontent.com/2415484/107130646-973bee80-68c7-11eb-9025-b18394ac5c93.png) ACKs for top commit: jarolrod: ACK be4cf4832f117ab5f97e1367f7bdcb5361de0dae leonardojobim: Tested ACK https://github.com/bitcoin-core/gui/commit/be4cf4832f117ab5f97e1367f7bdcb5361de0dae on Ubuntu 20.04 on VMWare. Tree-SHA512: 6c6d1dbe7d6bdb616acff0aaf8f4223546f1d2524566e9cd6e5b1b3bed2be1e9b20b1bc52ed3b627df53ba1f2fe0bc76f036cf16ad934d8a446b515d9bece3b1
2021-02-21gui: Add monospaced font settingsHennadii Stepanov
2021-02-21qt: Choose monospaced font in C++ code rather in `*.ui` fileHennadii Stepanov
Setting the "Monospace" font family in a `*.ui` file does not work on macOS, at least on Big Sur with Qt 5.15 (neither via the "font" property nor via the "styleSheet" property). Qt chooses the ".AppleSystemUIFont" instead of ".AppleSystemUIFontMonospaced". This change makes macOS choose the correct monospaced font.
2021-02-21qt: Make GUIUtil::fixedPitchFont aware of embedded fontHennadii Stepanov
2021-02-21gui: Add Roboto Mono fontHennadii Stepanov
2021-02-20Merge #20750: [Bundle 2/n] Prune g_chainman usage in mempool-related ↡MarcoFalke
validation functions e8ae1db864b09a47c736631e6cd3f5ec17929850 style-only: Make AcceptToMemoryPool signature readable (Carl Dong) 8f5c100064bea720351d450f8116ff3abe0515cc style-only: Make CheckSequenceLock signature readable (Carl Dong) 8c824819c85005ee6c783e9f8fa43ff91716e33d validation: Use *this in CChainState::LoadMempool (Carl Dong) 0a9a24d8c717e88e36e16014630cec8eada8dfcb validation: Pass in chainstate to UpdateMempoolForReorg (Carl Dong) 714201881251a787423fbca34f70fed505e9dc28 validation: Pass in chainstate to CTxMemPool::removeForReorg (Carl Dong) 71734c65dc491a4bb654ccbb7a1dd0e12131cee4 validation: Pass in chain to ::TestLockPointValidity (Carl Dong) 120aaba9ac41af71a760aa0969dd090e96786fb3 tree-wide: Fix erroneous AcceptToMemoryPool replacements (Carl Dong) 417dafc1ee07af3319c2fe89758123cb8362ff16 validation: Remove old AcceptToMemoryPool w/o chainstate param (Carl Dong) 3704433c4f5ecf9f196860b2ccecae0d2c8b5f6e scripted-diff: Invoke ::AcceptToMemoryPool with chainstate (Carl Dong) 229bc37b5f18cffbc85efbad3b6e9047c6951e95 validation: Pass in chainstate to ::AcceptToMemoryPool (Carl Dong) d0da7ea57ab932eca956458fb3633585ff3c0003 validation: Pass in chainstate to ::LoadMempool (Carl Dong) 3a205c43dc03cc833daba93087279402f640965b validation: Pass in chainstate to AcceptToMemoryPoolWithTime (Carl Dong) d8a816329c878b5973d28d370c0f64ebbdde716b validation: Add chainstate member to MemPoolAccept (Carl Dong) 4c15942b79c46256950df17c348302679e668ebc validation: Pass in chainstate to ::CheckSequenceLocks (Carl Dong) 577b774d0c664b891bc9e1550ef179a655a466ad validation: Remove old CheckFinalTx w/o chain tip param (Carl Dong) 7031cf89db943d3e73597d2f9fa4a41908558e6c scripted-diff: Invoke ::CheckFinalTx with chain tip (Carl Dong) d015eaa550027a387cd548cf0bcfa1a4c31a3374 validation: Pass in chain tip to ::CheckFinalTx (Carl Dong) 252b489c9f9c9e7dceb919e9cbd208ea72d75e68 validation: Pass in coins tip to CheckInputsFromMempoolAndCache (Carl Dong) 73a6d2b7bea832fe24870dd7593c8fc1028e8d57 validation: Pass in chainstate to IsCurrentForFeeEstimation (Carl Dong) d1f932b0b0685690e5142272a2ed6a21237fbf05 validation: Pass in coins cache to ::LimitMempoolSize (Carl Dong) Pull request description: Overall PR: #20158 (tree-wide: De-globalize ChainstateManager) Note to reviewers: 1. This bundle may _apparently_ introduce usage of `g_chainman` or `::Chain(state|)Active()` globals, but these are resolved later on in the overall PR. [Commits of overall PR](https://github.com/bitcoin/bitcoin/pull/20158/commits) 2. There may be seemingly obvious local references to `ChainstateManager` or other validation objects which are not being used in callers of the current function in question, this is done intentionally to **_keep each commit centered around one function/method_** to ease review and to make the overall change systematic. We don't assume anything about our callers. Rest assured that once we are considering that particular caller in later commits, we will use the obvious local references. [Commits of overall PR](https://github.com/bitcoin/bitcoin/pull/20158/commits) 3. When changing a function/method that has many callers (e.g. `LookupBlockIndex` with 55 callers), it is sometimes easier (and less error-prone) to use a scripted-diff. When doing so, there will be 3 commits in sequence so that every commit compiles like so: 1. Add `new_function`, make `old_function` a wrapper of `new_function`, divert all calls to `old_function` to `new_function` **in the local module only** 2. Scripted-diff to divert all calls to `old_function` to `new_function` **in the rest of the codebase** 3. Remove `old_function` ACKs for top commit: glozow: reACK https://github.com/bitcoin/bitcoin/commit/e8ae1db864b09a47c736631e6cd3f5ec17929850 via `git range-diff 15f0042...e8ae1db`, only change is fixing ATMP call from conflict MarcoFalke: ACK e8ae1db864b09a47c736631e6cd3f5ec17929850 πŸ“£ Tree-SHA512: 6af50f04940a69c5c3d3796a24f32f963fa02503cdc1155cc11fff832a99172b407cd163a19793080a5af98580f051b48195b62ec4a797ba2763b4883174153d
2021-02-19Merge #21211: test: Move P2WSH_OP_TRUE to shared test libraryMarcoFalke
22220ef6d5f331c9e1f3e9487eaf07ab13693921 test: Move P2WSH_OP_TRUE to shared test library (MarcoFalke) Pull request description: Otherwise it can't be used in other tests (unit, fuzz, bench, ...) ACKs for top commit: darosior: ACK 22220ef6d5f331c9e1f3e9487eaf07ab13693921 Tree-SHA512: 1b636e751281291f7c21ac51c3d014f6a565144c9482974391c516228e756442b077655eda970eb8bdb12974b97855a909b2b60d518026a8d5f41aa15ec7cbc8
2021-02-19Merge #21187: Net processing: Only call PushAddress() from net_processingMarcoFalke
3e68efa615968e0c9d68a7f197c7852478f6be78 [net] Move checks from GetLocalAddrForPeer to caller (John Newbery) d21d2b264cd77c027a06f68289cf4c3f177d1ed0 [net] Change AdvertiseLocal to GetLocalAddrForPeer (John Newbery) Pull request description: This is the first part of #21186. It slightly disentangles addr handling in net/net_processing by making it explicit that net_processing is responsible for pushing addr records into `vAddrToSend`. ACKs for top commit: MarcoFalke: re-ACK 3e68efa615968e0c9d68a7f197c7852478f6be78 πŸ… Tree-SHA512: 9af50c41f5a977e2e277f24a589db38e2980b353401def5e74b108ac5f493d9b5d6b1b8bf15323a4d66321495f04bc271450fcef7aa7d1c095f051a4f8e9b15f
2021-02-19Merge #21226: build: Fix fuzz binary compilation under windowsMarcoFalke
56ace907b9b7b4544c95e2945dc07e217718a8e5 Fix fuzz binary compilation under windows (Dan Benjamin) Pull request description: Small change to allow the fuzz binary to compile under windows. Also removed --disable-fuzz-binary from the windows CI test. This fixes #21212. ACKs for top commit: MarcoFalke: review ACK 56ace907b9b7b4544c95e2945dc07e217718a8e5 the best bugfixes are the ones removing code Tree-SHA512: 6088fd955a5e511b5ca1b3eaa8469a889eb6d994c2827acac7695dac6e4e320a344b45f4015a2f279b16df0d4b23ec4df13304ae6315395ad2fe8c5b526cada4
2021-02-19Merge #21221: [tools] Allow argument/parameter bin packing in clang-formatMarcoFalke
876ac3f6b62087fb5c22b0a477751895915d47b8 [tools] Allow argument/parameter bin packing in clang-format (John Newbery) Pull request description: clang-format documentation for BinPackArguments: If `false`, a function call’s arguments will either be all on the same line or will have one line each. ``` true: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } false: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } ``` https://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options There's no reason to forbid this format. Having multiple arguments or parameters per line can be just as readable as having one per line (and is certainly more readable than having extremely long lines). ACKs for top commit: laanwj: ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 MarcoFalke: review ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 vasild: ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 Tree-SHA512: 7c401b4551b458c83dd70883860788b4a60e08a5399171fef27a2f5fdc6b933f6454fe0d396c32d826e3ab537791329da3275ae9b5e9ad36630a6dc2c167e88f
2021-02-19Merge #21228: test: Avoid comparision of integers with different signsfanquake
bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c Avoid comparision of integers with different signs (Jonas Schnelli) Pull request description: Fixes an integer comparison of different signs (which errors out on `-Werror,-Wsign-compare`). Introduced in #21121. See https://bitcoinbuilds.org/index.php?ansilog=982c61cf-6969-4001-bebc-dc215e5d29a4.log ACKs for top commit: MarcoFalke: review ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c amitiuttarwar: ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c vasild: ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c Tree-SHA512: cb22a6239a1fc9d0be5573bf6ae4ec379eb7398c88edc8fa2ae4fd721f37f9ca3724896c1ac16de14a5286888a0b631813da32cb62d177ffbf9b2c31e716a7aa
2021-02-19Merge #21201: rpc: Disallow sendtoaddress and sendmany when private keys ↡Samuel Dobson
disabled 6bfbc97d716faad38c87603ac6049d222236d623 test: disallow sendtoaddress/sendmany when private keys disabled (Jon Atack) 0997019e7681efb00847a7246c15ac8f235128d8 Disallow sendtoaddress and sendmany when private keys disabled (Andrew Chow) Pull request description: Since `sendtoaddress` and `sendmany` (which use the `SendMoney` function) create and commit a transaction, they should not do anything when the wallet does not have private keys. Otherwise a valid transaction cannot be made. Fixes #21104 ACKs for top commit: jonatack: ACK 6bfbc97d716faad38c87603ac6049d222236d623 meshcollider: utACK 6bfbc97d716faad38c87603ac6049d222236d623 kristapsk: ACK 6bfbc97d716faad38c87603ac6049d222236d623. "Error: Private keys are disabled for this wallet" is definitely a better error message than "Insufficient funds" here. Hopefully change of error code from -6 to -4 doesn't break any software using Bitcoin JSON-RPC API. Tree-SHA512: f277d6b5252e43942d568614032596f2c0827f00cd0cb71e44ffcb9822bfb15a71730a3e3688f31e59ba4eb7d275250c4e65ad4b6b3e96be6314c56a672432fb
2021-02-18Fix fuzz binary compilation under windowsDan Benjamin
2021-02-18style-only: Make AcceptToMemoryPool signature readableCarl Dong
2021-02-18style-only: Make CheckSequenceLock signature readableCarl Dong
2021-02-18validation: Use *this in CChainState::LoadMempoolCarl Dong
2021-02-18validation: Pass in chainstate to UpdateMempoolForReorgCarl Dong
2021-02-18validation: Pass in chainstate to CTxMemPool::removeForReorgCarl Dong
Several other parameters are now redundant since they can be safely obtained from the chainstate given that ::cs_main is locked. These are now removed.
2021-02-18validation: Pass in chain to ::TestLockPointValidityCarl Dong
2021-02-18tree-wide: Fix erroneous AcceptToMemoryPool replacementsCarl Dong
2021-02-18validation: Remove old AcceptToMemoryPool w/o chainstate paramCarl Dong
2021-02-18scripted-diff: Invoke ::AcceptToMemoryPool with chainstateCarl Dong
-BEGIN VERIFY SCRIPT- find_regex='\bAcceptToMemoryPool\(' \ && git grep -l -E "$find_regex" -- src \ | grep -v '^src/validation\.\(cpp\|h\)$' \ | xargs sed -i -E 's@'"$find_regex"'@\0::ChainstateActive(), @g' -END VERIFY SCRIPT-
2021-02-18validation: Pass in chainstate to ::AcceptToMemoryPoolCarl Dong
2021-02-18validation: Pass in chainstate to ::LoadMempoolCarl Dong
2021-02-18validation: Pass in chainstate to AcceptToMemoryPoolWithTimeCarl Dong
2021-02-18validation: Add chainstate member to MemPoolAcceptCarl Dong
2021-02-18validation: Pass in chainstate to ::CheckSequenceLocksCarl Dong
2021-02-18validation: Remove old CheckFinalTx w/o chain tip paramCarl Dong
2021-02-18scripted-diff: Invoke ::CheckFinalTx with chain tipCarl Dong
-BEGIN VERIFY SCRIPT- find_regex='\bCheckFinalTx\(' \ && git grep -l -E "$find_regex" -- src \ | grep -v '^src/validation\.\(cpp\|h\)$' \ | xargs sed -i -E 's@'"$find_regex"'@\0::ChainActive().Tip(), @g' -END VERIFY SCRIPT-
2021-02-18validation: Pass in chain tip to ::CheckFinalTxCarl Dong
2021-02-18validation: Pass in coins tip to CheckInputsFromMempoolAndCacheCarl Dong
2021-02-18validation: Pass in chainstate to IsCurrentForFeeEstimationCarl Dong
2021-02-18validation: Pass in coins cache to ::LimitMempoolSizeCarl Dong
2021-02-18Avoid comparision of integers with different signsJonas Schnelli
2021-02-18Merge #19809: log: Prefix log messages with function name and source code ↡Wladimir J. van der Laan
location if -logsourcelocations is set b4511e2e2ed1a6077ae6826a9ee6b7a311293d08 log: Prefix log messages with function name if -logsourcelocations is set (practicalswift) Pull request description: Prefix log messages with function name if `-logfunctionnames` is set. Yes, exactly like `-logthreadnames` but for function names instead of thread names :) This is a small developer ergonomics improvement: I've found this to be a cheap/simple way to correlate log output and originating function. For me it beats the ordinary cycle of 1.) try to figure out a regexp matching the static part of the dynamic log message, 2.) `git grep -E 'Using .* MiB out of .* requested for signature cache'`, 3.) `mcedit filename.cpp` (`openemacs filename.cpp` works too!) and 4.) search for log message and scroll up to find the function name :) Without any logging parameters: ``` $ src/bitcoind -regtest 2020-08-25T03:29:04Z Using RdRand as an additional entropy source 2020-08-25T03:29:04Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2020-08-25T03:29:04Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2020-08-25T03:29:04Z Loaded best chain: hashBestChain=0fff88f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e22ff height=0 date=2011-02-02T23:16:42Z progress=1.000000 2020-08-25T03:29:04Z block tree size = 1 2020-08-25T03:29:04Z nBestHeight = 0 2020-08-25T03:29:04Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast 2020-08-25T03:29:04Z 0 addresses found from DNS seeds ``` With `-logthreadnames` and `-logfunctionnames`: ``` $ src/bitcoind -regtest -logthreadnames -logfunctionnames 2020-08-25T03:29:04Z [init] [ReportHardwareRand] Using RdRand as an additional entropy source 2020-08-25T03:29:04Z [init] [InitSignatureCache] Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2020-08-25T03:29:04Z [init] [InitScriptExecutionCache] Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2020-08-25T03:29:04Z [init] [LoadChainTip] Loaded best chain: hashBestChain=0fff88f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e22ff height=0 date=2011-02-02T23:16:42Z progress=1.000000 2020-08-25T03:29:04Z [init] [AppInitMain] block tree size = 1 2020-08-25T03:29:04Z [init] [AppInitMain] nBestHeight = 0 2020-08-25T03:29:04Z [loadblk] [LoadMempool] Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast 2020-08-25T03:29:04Z [dnsseed] [ThreadDNSAddressSeed] 0 addresses found from DNS seeds ``` ACKs for top commit: laanwj: Code review ACK b4511e2e2ed1a6077ae6826a9ee6b7a311293d08 MarcoFalke: review ACK b4511e2e2ed1a6077ae6826a9ee6b7a311293d08 πŸŒƒ Tree-SHA512: d100f5364630c323f31d275259864c597f7725e462d5f4bdedcc7033ea616d7fc0d16ef1b2af557e692f4deea73c6773ccfc681589e7bf6ba970b9ec169040c7
2021-02-18gui: display BIP152 high bandwidth relay in peer detailsJon Atack
2021-02-18gui: display fRelayTxes in peer detailsJon Atack
2021-02-18[tools] Allow argument/parameter bin packing in clang-formatJohn Newbery
2021-02-18[net] Move checks from GetLocalAddrForPeer to callerJohn Newbery
GetLocalAddrForPeer() is only called in one place. The checks inside that function make more sense to be carried out be the caller: - fSuccessfullyConnected is already checked at the top of SendMessages(), so must be true when we call GetLocalAddrForPeer() - fListen can go into the conditional before GetLocalAddrForPeer() is called.
2021-02-18[net] Change AdvertiseLocal to GetLocalAddrForPeerJohn Newbery
Gossiping addresses to peers is the responsibility of net processing. Change AdvertiseLocal() in net to just return an (optional) address for net processing to advertise. Update function name to reflect new responsibility.
2021-02-18Merge #19136: wallet: add parent_desc to getaddressinfoSamuel Dobson
de6b389d5db7b8426313c5be6fbd290f992c5aa8 tests: Test getaddressinfo parent_desc (Andrew Chow) e4ac869a0a0083e2e3af3b56301bd5c8e0cf650b rpc: Add parent descriptor to getaddressinfo output (Andrew Chow) bbe4a36152fb8d9c8c3682ca2380f1c88cca61cb wallet: Add GetDescriptorString to DescriptorScriptPubKeyMan (Andrew Chow) 9be1437c49f986e8ed964d5f863b4bbcec340751 descriptors: Add ToNormalizedString and tests (Andrew Chow) Pull request description: Adds `parent_desc` field to the `getaddressinfo` RPC to export a public descriptor. Using the given address, `getaddressinfo` will look up which `DescriptorScriptPubKeyMan` can be used to produce that address. It will then return the descriptor for that `DescriptorScriptPubKeyMan` in the `parent_desc` field. The descriptor will be in a normalized form where the xpub at the last hardened step is derived so that the descriptor can be imported to other wallets. Tests are added to check that the correct descriptor is being returned for the wallet's addresses and that these descriptors can be imported and used in other wallets. As part of this PR, a `ToNormalizedString` function is added to the descriptor classes. This really only has an effect on `BIP32PubkeyProvider`s that have hardened derivation steps. Tests are added to check that normalized descriptors are returned. ACKs for top commit: Sjors: utACK de6b389d5db7b8426313c5be6fbd290f992c5aa8 S3RK: Tested ACK de6b389 jonatack: Tested ACK de6b389d5db7b8426313c5be6fbd290f992c5aa8 modulo a few minor comments fjahr: Code review ACK de6b389d5db7b8426313c5be6fbd290f992c5aa8 meshcollider: Tested ACK de6b389d5db7b8426313c5be6fbd290f992c5aa8 Tree-SHA512: a633e4a39f2abbd95afd7488484cfa66fdd2651dac59fe59f2b80a0940a2a4a13acf889c534a6948903d701484a2ba1218e3081feafe0b9a720dccfa9e43ca2b
2021-02-18Merge #15946: Allow maintaining the blockfilterindex when using pruneJonas Schnelli
84716b134e9afca2fba7731de4af1f22fa1b1518 Add "index/blockfilterindex -> validation -> index/blockfilterindex" to expected circular dependencies (Jonas Schnelli) ab3a0a2fb915d8b8384c30a8b38b4b5cc35236fd Add functional test for blockfilterindex in prune-mode (Jonas Schnelli) c286a22f7b63a8bd336d5d7606c339053ee0054b Add debug startup parameter -fastprune for more effective pruning tests (Jonas Schnelli) 5e112269c311a559bfded814d3c3c438349a1986 Avoid pruning below the blockfilterindex sync height (Jonas Schnelli) 00d57ff76854938ead800767fb673a8af46eac8e Avoid accessing nullpointer in BaseIndex::GetSummary() (Jonas Schnelli) 6abe9f5b11cd4a5ecb6caca8443fe2950a417842 Allow blockfilter in conjunction with prune (Jonas Schnelli) Pull request description: Maintaining the blockfilterindexes in prune mode is possible and may lead to efficient p2p based rescans of wallets (restore backups, import/sweep keys) beyond the prune height (rescans not part of that PR). This PR allows running the blockfilterindex(es) in conjunction with pruning. * Bitcoind/Qt will shutdown during startup when missing block data has been detected ([re]enable `-blockfilterindex` when we already have pruned) * manual block pruning is disabled during blockfilterindex sync * auto-pruning is delayed during blockfilterindex sync ToDos: * [x] Functional tests ACKs for top commit: fjahr: Code review ACK 84716b1 ryanofsky: Code review ACK 84716b134e9afca2fba7731de4af1f22fa1b1518. Only changes since last review were suggested new FindFilesToPrune argument and test. benthecarman: tACK 84716b134e9afca2fba7731de4af1f22fa1b1518 Tree-SHA512: 91d832c6c562c463f7ec7655c08956385413a99a896640b9737bda0183607fac530435d03d87c3c0e70c61ccdfe73fe8f3639bc7d26d33ca7e60925ebb97d77a