Commit Graph

20069 Commits

Author SHA1 Message Date
UdjinM6
8e19b6b398
Merge pull request #4271 from PastaPastaPasta/backports-0.18-pr8
Backports 0.18 pr8
2021-07-19 20:49:51 +03:00
PastaPastaPasta
c184c456a7
doc: use updated discord, include Dash Developer discord, reorganize (#4272)
* doc: use updated discord, include Dash Developer discord, reorganize

Signed-off-by: pasta <pasta@dashboost.org>

* adjust order
2021-07-19 20:42:01 +03:00
Pasta
0bbe57d0a0
Avoid redundant protected in CAddrMan 2021-07-19 12:28:24 -05:00
Pasta
27223b7bcc
Apply fake8 version pinning in Dockerfile.builder 2021-07-19 12:27:20 -05:00
UdjinM6
3597c55811
Merge pull request #4275 from PastaPastaPasta/backport-banman
Backport 15138 and 14605
2021-07-19 14:07:57 +03:00
UdjinM6
80a947d0ac
Merge pull request #4270 from PastaPastaPasta/backport-univalue
Backport univalue
2021-07-19 12:39:47 +03:00
PastaPastaPasta
4d80e2865e
tests: reenable when backporting Bitcoin #10321 (#4273)
Signed-off-by: pasta <pasta@dashboost.org>
2021-07-19 12:36:30 +03:00
UdjinM6
f11c1bc1f8
Ignore immer in code coverage checks, lint-whitespace.sh and copyright_header.py scripts (#4268) 2021-07-19 12:32:29 +03:00
UdjinM6
46e3a8c295
Fix lint-git-commit-check.sh (#4267)
We merge PRs into develop, not in master
2021-07-19 12:32:12 +03:00
Kittywhiskers Van Gogh
d89ab778e2
immer: update source tree to 609d1958fc588f0b73f25c7c3b0c8b78f084c983 (#4257) 2021-07-19 12:31:47 +03:00
Wladimir J. van der Laan
38ee2a7a94 Merge #14605: Return of the Banman
18185b57c32d0a43afeca4c125b9352c692923e9 scripted-diff: batch-recase BanMan variables (Carl Dong)
c2e04d37f3841d109c1fe60693f9622e2836cc29 banman: Add, use CBanEntry ctor that takes ban reason (Carl Dong)
1ffa4ce27d4ea6c1067d8984455df97994c7713e banman: reformulate nBanUtil calculation (Carl Dong)
daae598feb034f2f56e0b00ecfb4854d693d3641 banman: add thread annotations and mark members const where possible (Cory Fields)
84fc3fbd0304a7d6e660bf783c84bed2dd415141 scripted-diff: batch-rename BanMan members (Cory Fields)
af3503d903b1a608cd212e2d74b274103199078c net: move BanMan to its own files (Cory Fields)
d0469b2e9386a7a4b268cb9725347e7517acace6 banman: pass in default ban time as a parameter (Cory Fields)
2e56702ecedd83c4b7cb8de9de5c437c8c08e645 banman: pass the banfile path in (Cory Fields)
4c0d961eb0d7825a1e6f8389d7f5545114ee18c6 banman: create and split out banman (Cory Fields)
83c1ea2e5e66b8a83072e3d5ad6a4ced406eb1ba net: split up addresses/ban dumps in preparation for moving them (Cory Fields)
136bd7926c72659dd277a7b795ea17f72e523338 tests: remove member connman/peerLogic in TestingSetup (Cory Fields)
7cc2b9f6786f9bc33853220551eed33ca6b7b7b2 net: Break disconnecting out of Ban() (Cory Fields)

Pull request description:

  **Old English à la Beowulf**
  ```
  Banman wæs bréme    --blaéd wíde sprang--
  Connmanes eafera    Coreum in.
  aéglaéca            léodum forstandan
  Swá bealdode        bearn Connmanes
  guma gúðum cúð      gódum daédum·
  dréah æfter dóme·   nealles druncne slóg
  ```

  **Modern English Translation**
  ```
  Banman was famed              --his renown spread wide--
  Conman's hier,                in Core-land.
  against the evil creature     defend the people
  Thus he was bold,             the son of Connman
  man famed in war,             for good deeds;
  he led his life for glory,    never, having drunk, slew
  ```

  --

  With @theuni's blessing, here is Banman, rebased. Original PR: https://github.com/bitcoin/bitcoin/pull/11457

  --

  Followup PRs:
  1. Give `CNode` a `Disconnect` method ([source](https://github.com/bitcoin/bitcoin/pull/14605#discussion_r248065847))
  2. Add a comment to `std::atomic_bool fDisconnect` in `net.h` that setting this to true will cause the node to be disconnected the next time `DisconnectNodes()` runs ([source](https://github.com/bitcoin/bitcoin/pull/14605#discussion_r248384309))

Tree-SHA512: 9c207edbf577415c22c9811113e393322d936a843d4ff265186728152a67c057779ac4d4f27b895de9729f7a53e870f828b9ebc8bcdab757520c2aebe1e9be35
2021-07-17 22:32:12 -05:00
Wladimir J. van der Laan
b8bc9e9643 Merge #15138: Drop IsLimited in favor of IsReachable
d6b076c17bc7d513243711563b262524ef0ba74c Drop IsLimited in favor of IsReachable (Ben Woosley)

Pull request description:

  These two methods have had the same meaning, but inverted, since
  110b62f069. Having one name for a single
  concept simplifies the code.

  This is a follow-up to #15051.
  /cc #7553

Tree-SHA512: 347ceb9e2a55ea06f4c01226411c7bbcade09dd82130e4c59d0824ecefd960875938022edbe5d4bfdf12b0552c9b4cb78b09a688284d707119571daf4eb371b4
2021-07-17 22:32:12 -05:00
Wladimir J. van der Laan
e481d2ca49 Merge #14647: build: Remove illegal spacing in darwin.mk
63c74d2d3abcb685c773c3ad1414da6ad062a55d build: Remove illegal spacing in darwin.mk (Jon Layton)

Pull request description:

  MacOS 10.13.6, `make -v` = `GNU Make 4.2.1  Built for x86_64-apple-darwin17.7.0`

  ```
  cd depends
  make HOST=x86_64-apple-darwin17.7.0
  ```
  Results in error:
  ```
  builders/darwin.mk:1: *** empty variable name.  Stop.
  ```

  This seems to fix it.

Tree-SHA512: 3481b9418571186c123942dc95b12bcaf47acbe2099ddd4524f5bb9dfe203175d7252bb7a1aa8ca5fec82578beeacfa06299472cb9d0d627c61f09486d74756c
2021-07-17 14:34:24 -05:00
MarcoFalke
dab5cfb8ca Merge #11634: wallet: Add missing cs_wallet/cs_KeyStore locks to wallet
69e7ee2dd8 Add GUARDED_BY(cs_wallet) for setExternalKeyPool, mapKeyMetadata, m_script_metadata and setLockedCoins (practicalswift)
37b2538c2d Add GUARDED_BY(cs_wallet) for encrypted_batch, nWalletMaxVersion, m_max_keypool_index and nOrderPosNext (practicalswift)
dee42927c9 wallet: Add Clang thread safety analysis annotations (practicalswift)
1c7e25db0c wallet: Add missing locks (practicalswift)

Pull request description:

  Add missing wallet locks:

  * Calling the function `GetConflicts(...)` requires holding the mutex `cs_wallet`
  * Calling the function `IsSpent(...)` requires holding the mutex `cs_wallet`
  * Accessing the variables `mapKeys` and `mapCryptedKeys` requires holding the mutex `cs_KeyStore`
  * Accessing the variable `nTimeFirstKey` requires holding the mutex `cs_wallet`
  * Accessing the variable `mapWallet` requires holding the mutex `cs_wallet`
  * Accessing the variable `nTimeFirstKey` requires holding the mutex `cs_wallet`

Tree-SHA512: 8a7b9a4e1f2147e77c04b817617a06304a2e2159148d3eb3514a3c09c41d77ef7e773df6e63880ad9acc026e00690f72d0c51f3f86279177f672d477423accca
2021-07-17 14:29:12 -05:00
MarcoFalke
9b4571a133 Merge #14444: Add compile time checking for cs_main locks which we assert at run time
0089905361 Add compile time checking for cs_main locks which we assert at run time (practicalswift)

Pull request description:

  Assert locking requirements at compile-time (`EXCLUSIVE_LOCKS_REQUIRED(foo)`) instead of at run-time (`AssertLockHeld(…)`).

Tree-SHA512: f4965ebf4bb5dbf5e7ed738cacf82c0f6cd55134fb968860bf84a84e29806485617f223910bb8c5461213f1829b0137c64ba1f6d6a2008b3cac3bb3a28df9324
2021-07-17 14:26:36 -05:00
MarcoFalke
dc425c3fea Merge #14526: docs: Document lint tests
8640631ebc docs: Document lint tests (Mason Simon)

Pull request description:

  Replaces #13708.
  Fixed the macOS nit, and added `codespell` as a requirement.

Tree-SHA512: efdef8238f9d4433cc6403f58075b906d39d6a2114821cb113a16f2fc45d0c10c603588272865edd40a0498d9685ff8ac25d2491d9fcf0f1f328b6d65751ac2c
2021-07-17 14:25:42 -05:00
Pieter Wuille
bf84aca4db Merge #14524: Trivial: fix typo
7e18673f04 Fix typo (Kristaps Kaupe)

Pull request description:

Tree-SHA512: 3f3557d9aad007562b780e34c25584d0de6f240cb9ff56779d224bf9b8cd7bd657c92a73222fd8d7f679c282dce6a75265ca61e20d50a834caa4a9f21a286b3a
2021-07-17 14:22:51 -05:00
Wladimir J. van der Laan
166850ad5d Merge #14177: qt: Set C locale for amountWidget
b0510d78aedde864756199fe71ca98f8e95dd44f Set C locale for amountWidget (Hennadii Stepanov)

Pull request description:

  Fix #13873

Tree-SHA512: ef26b35ef83c3a87ebd90650f6d833b00a24f6c114b68fe01acd4a14d1f5bdec066f438eb7781c1e55c32640838c54e00b8f082c390639ade8d9a58830833d4a
2021-07-17 14:20:19 -05:00
Wladimir J. van der Laan
a4ff5cada2 Merge #14496: build: Pin to specific versions of Python packages we install from PyPI in Travis
ee0b7c4e8a1ec88877ffa65e772f66a8a66cb928 build: Pin to specific versions of Python packages we install from PyPI in Travis (practicalswift)

Pull request description:

  Pin to specific versions of Python packages we install from PyPI in Travis.

  To avoid the possibility of surprise build failures when a new version of a PyPI dependency is released.

Tree-SHA512: 1c9abc094ad6b38992d0e7a5dd7f6c6c070a2eb81b052eb2397c1f1a489162cf8cedbd33db9bf97f32a81ed4dd0e986a76815c623a9b6c04b6ca6c5832d68211
2021-07-17 14:19:25 -05:00
MarcoFalke
c4a60148b9 Merge #14455: build: unbreak make clean
a48e44bd4f Fix CLEAN_BITCOIN_TEST to remove .log files for all BITCOIN_TESTS files (James O'Beirne)

Pull request description:

  My preferred alternative to https://github.com/bitcoin/bitcoin/pull/14440 (I'm too lazy to review an entire file move). This just applies a `.log` suffix addition to all `BITCOIN_TESTS` files for the purposes of cleaning, and thus doesn't erroneously remove test/scriptnum10.h.

Tree-SHA512: 06a0d9fb2c4851f4e74215aa4bca9cf81f49787f16c46b0172e5c1cf18ca744d747c5b0c1564cac433e0dea29b0afabd2d95f0f58a0157d1e05b2b7cb7800e00
2021-07-17 13:52:11 -05:00
MarcoFalke
b968ebf34c Merge #13115: addrman: Add Clang thread safety annotations for variables guarded by CAddrMan.cs
3e9f6c821b Add missing locks and locking annotations for CAddrMan (practicalswift)

Pull request description:

  * Add Clang thread safety annotations for variables guarded by `CAddrMan.cs `
  * Add missing `CAddrMan.cs ` locks

Tree-SHA512: c78d56d56eb63a4469333c04c95317545a8f97d5e3a36ff2699ee4a91a6433d416221eed6c5ff168e1e31f6936c2ae101a4c60b635f2b2309f40e3d66a727322
2021-07-17 13:51:59 -05:00
MarcoFalke
9d0fb5c295 Merge #14253: Build: during 'make clean', remove some files that are currently missed.
3f5ac27205 Include some files currently missed by 'make distclean'. (murrayn)

Pull request description:

  `make clean` currently leaves behind some cache and test log files that should be removed.

Tree-SHA512: a1877e776e24232f6dd1468d7f392ea0bd1e93fdd975e623897d48c4b23a080a2e84ebb199f5482abd6b8c9ddd036850325e7b7ed07e2f9fe7a32f83cc99da4a
2021-07-17 13:50:02 -05:00
fanquake
5c692daf17
Merge #20424: build: Update univalue subtree
2a55a0ed3055a2ce0a33b58a3a7bbf6e30df3dfd Squashed 'src/univalue/' changes from 98261b1e7b..98fadc0909 (MarcoFalke)

Pull request description:

  Just a minor bugfix: Currently we don't push booleans into arrays, but if we did they'd be pushed as integers.

  Can be tested by reverting the diff in `include/` and observing a test failure.

ACKs for top commit:
  laanwj:
    ACK fa17eef6274811be5348149443e563bca95d54a3
  practicalswift:
    cr ACK fa17eef6274811be5348149443e563bca95d54a3

Tree-SHA512: d87ca5be6769b4cd0c9b9e319973bc0c4f2b7121779f9554e11f34a4edb0013997e875c7edb7bc6eb9309ff5c13379d22f436cd4fb9e6e68df6f0aee29fed914
2021-07-17 12:09:42 -05:00
fanquake
52c55d63eb
Merge #18099: Update univalue subtree
97aa5740c0e9ef433cbedafe689b641297b50f5e Squashed 'src/univalue/' changes from 5a58a46671..98261b1e7b (MarcoFalke)

Pull request description:

  Closes #17742

ACKs for top commit:
  fanquake:
    ACK fad9ea8fdb0a7269a3fcc472fd948669d74f7aa7

Tree-SHA512: 6316cb0e974ee6575e2a98930203dc7d155b346d2d2fe5a322e3d8b77a87d378d31fde16ea2f90ff93736429ddb89799a26945de13ce4a20132550bbcec0a48e
2021-07-17 12:04:59 -05:00
UdjinM6
886024ba25
Merge pull request #4203 from UdjinM6/pr4196
ci: Add `--enable-werror` to arm and c++17 builds (and fix all issues found via these builds)
2021-07-17 02:37:07 +03:00
UdjinM6
0dc8cbc780
Merge pull request #4265 from PastaPastaPasta/auto-label-conflicting
actions: automatically add a "needs rebase" label and comment as relevant
2021-07-17 01:50:35 +03:00
pasta
c13f9ae6ab Ensure pemissions are restrictive 2021-07-16 17:43:32 -05:00
pasta
c79561335a actions: automatically add a "needs rebase" label and comment as relevant 2021-07-16 17:43:32 -05:00
UdjinM6
88da87d202
Merge pull request #4262 from PastaPastaPasta/backport-triv-pr17
Backport triv pr17
2021-07-16 20:30:46 +03:00
UdjinM6
0c2b1be930
Merge pull request #4261 from PastaPastaPasta/backport-triv-pr16
Backport triv pr16
2021-07-16 20:20:26 +03:00
UdjinM6
47317e8fd0
Merge pull request #4254 from UdjinM6/fix_permitsigdata
Merge #14356: fix converttopsbt permitsigdata arg, add basic test
2021-07-16 20:16:33 +03:00
UdjinM6
730a89f8ed
Merge pull request #4246 from kittywhiskers/deboostification
merge bitcoin#13671, #17405, #18786, #18792, #20067: Deboostification
2021-07-16 20:16:04 +03:00
fanquake
9dc2ed4208 Merge #20353: configure: Support -fdebug-prefix-map and -fmacro-prefix-map
7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 configure: Support -f{debug,macro}-prefix-map (Anthony Towns)

Pull request description:

  When bitcoin is checked out in two directories (eg via git worktree) object files between the two will differ due to the full path being included in the debug section. `-fdebug-prefix-map` is used to replace this with "." to avoid this unnecessary difference and allow ccache to share objects between worktrees (provided the source and compile options are the same).

  Also provide `-fmacro-prefix-map` if supported so that the working dir is not encoded in `__FILE__` macros.

ACKs for top commit:
  practicalswift:
    cr ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5: patch looks correct
  fanquake:
    ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5

Tree-SHA512: b6a37c1728ec3b2e552f244da0e66db113c1e7662c7ac502e12ff466f3dbfbfefae12695ca135137c50dbb1c4c5d84059116c0cd09b391a17466dc77b8726679
2021-07-16 10:04:09 -05:00
W. J. van der Laan
44060e39a0 Merge #21615: script: Add trusted key for hebasto
55d85834ccd73aa2f93cf9a81523cb747973346e script: Add trusted key for hebasto (Hennadii Stepanov)

Pull request description:

  It is assumed that my responsibility will be limited to the [GUI repo](https://github.com/bitcoin-core/gui).

ACKs for top commit:
  laanwj:
    ACK 55d85834ccd73aa2f93cf9a81523cb747973346e
  MarcoFalke:
    matches the key I have locally ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🍪
  jarolrod:
    ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🥃

Tree-SHA512: 256d03e108c9a14e251340ac6e91234d076778cb6bd551439182176207051f4efc55d396754867e5a7191c8c698610f92016668e163037c67dde56f4136026b8
2021-07-16 10:04:09 -05:00
fanquake
499fb6c18b Merge #21633: refactor: add [[noreturn]] attribute where applicable
003929c0d55532038d5bf6fc0ff4a20628710fae refactor: add [[noreturn]] attribute where applicable (fanquake)

Pull request description:

  Similar to #10843. We could build with `-Wmissing-noreturn`, however that would also mean modifying something like `--suppress-external-warnings` to suppress warnings for leveldb, which I don't think we want to do. In any case, the functions where this is applicable are only added/removed very rarely.

ACKs for top commit:
  vasild:
    ACK 003929c0d55532038d5bf6fc0ff4a20628710fae

Tree-SHA512: 33dfa6547d6b84f38a941f24d4c2effe8fde7b93dbc0b27a9309716420e4a879fdbe689d789fa5439d65f5f78292f89fd9dc1b61c97acf69316dfed954086705
2021-07-16 10:04:09 -05:00
fanquake
dcadc441aa Merge #21300: script: Add explanatory comment to tc.sh
3a0446fad470595db09929695ff02debe12bd4cd script: Add explanatory comment to tc.sh (dscotese)

Pull request description:

  This is a replacement for #21289

  tc.sh is used to limit bandwidth. I ran it and it is limiting my bandwidth. When I ran it, I got one error. I have not found an explanation anywhere of what the error means, but my best guess is consistent with the result, so I propose the explanatory comment to save others time when they use it and also get the error.

ACKs for top commit:
  laanwj:
    that said, LGTM ACK 3a0446fad470595db09929695ff02debe12bd4cd

Tree-SHA512: 5403a2a0fec3724625c20402a96334c3c7a620324a930c5fd828017da8911d2867aecb7a2ad94a23d1f189009d3eb197a67eb59c8e4531fd215d9b1edb600440
2021-07-16 10:04:09 -05:00
MarcoFalke
a5c84be618 Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls
257f55c119c2c63245f3a84a9cd8f7aaeaf2d129 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov)

Pull request description:

  The models of the both views have no `Qt::ItemIsEditable` flag:
  3c87dbe95c/src/qt/peertablemodel.cpp (L218-L224)
  3c87dbe95c/src/qt/bantablemodel.cpp (L148-L154)

ACKs for top commit:
  Talkless:
    utACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, seems reasonable.
  jarolrod:
    ACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, looks correct.

Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0
2021-07-16 10:04:09 -05:00
fanquake
9c8db95941 Merge #20734: build: Make platform-specific targets available for proper platform builds only
3d31abbaaad599443ec5ffee90ddb6989a625277 build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov)
92990e25b7e5d02651ffa27f2d57c4c2c190668e build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov)

Pull request description:

  On master (f1dbf92ff0475a01d20170ea422c1d086acbbc57) it is possible to point `make` to macOS and Windows specific targets even the build system is configured to build for Linux platforms:
  ```
  $ make Bitcoin-Core.dmg
  ...
  $ make bitcoin-21.99.0-win64-setup
  ...
  ```

  Such behavior makes no sense, and it is confused. Fixed in this PR.

ACKs for top commit:
  fanquake:
    ACK 3d31abbaaad599443ec5ffee90ddb6989a625277 - tested that nonsensical targets are no longer available. i.e

Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03
2021-07-16 10:04:09 -05:00
MarcoFalke
e07e289e0a Merge #21111: Improve OpenRC initscript
95f97111dd27f32dfcb461c9dd6890aa8d1355ed contrib/init: (OpenRC) quote some unquoted variables. (parazyd)
737feadff7c026412039774de0d10931fe0c5bcc contrib/init: (OpenRC) Do not fail if both rpcuser and rpcpassword are unset. (parazyd)

Pull request description:

  This pull request improves the available OpenRC initscripts in
  `contrib/init`.

  The first commit (737feadff7c026412039774de0d10931fe0c5bcc) reworks
  `checkconfig()` to not fail if **both** `rpcuser` and `rpcpassword`
  are unset, because this implies that bitcoind shall use the `.cookie`
  file for RPC authentication. Currently, the initscript does not allow
  starting bitcoind without a set `rpcuser` and `rpcpassword`.

  The second commit (95f97111dd27f32dfcb461c9dd6890aa8d1355ed) simply
  quotes some unquoted variables.

ACKs for top commit:
  kristapsk:
    ACK 95f97111dd27f32dfcb461c9dd6890aa8d1355ed

Tree-SHA512: 62bebcd07143c147e349c0cfc17b54ef21bd4684377b444f58c6bd1f509a4d3e1af58746fa7215f18e33021f691bbbc5e42f4df497458322b055e545b7f30d46
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
a9c314feba Merge #21123: code style: Add EditorConfig file
7a135d57b2ac17477b25d5046a3bec57eac3ab30 Add EditorConfig file. (Kiminuo)

Pull request description:

  ### Motivation

  Developers are supposed to follow [Coding style](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-general). However, [from time to time](https://github.com/bitcoin/bitcoin/pull/21075#discussion_r570125634) a PR is created and then its author is asked to change tabs to spaces, for example.

  Introducing an `.editorconfig` file can mitigate these formatting issues.

  ### User story

  A contributor wants to create a new PR. She clones Bitcoin Core repo, opens her editor, the editor loads `.editorconfig` rules and writes her patch with correct formatting rules. Less Coding Style issues is then discovered in the PR review process and thus less CI runs are needed.

  ### What is EditorConfig file?

  https://editorconfig.org provides very well and concise explanation:

  > What is EditorConfig?

  > EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

  ### Support

  `.editorconfig` is supported by many IDEs and text editors. Sometimes, the support is out of the box and sometimes a plugin is needed. However, for example, VS Code detects `.editorconfig` presence and automatically offers you to install the missing plugin.

  See https://editorconfig.org/#pre-installed for details on support. To name a few:

  * Visual Studio (out of the box)
  * VS Code (plugin)
  * JetBrains IDEs (IntelliJ IDEA, PyCharm, etc.) (out of the box)
  * Sublime Text (plugin)
  * Emacs (plugin)
  * Vim (plugin)

  Not supported (AFAIK):

  * [mcedit](https://github.com/MidnightCommander/mc)

  ### My editor does not support `.editorconfig`

  Then nothing really changes for you.

  ### `.editorconfig` vs `.clang-format`

  As explained [here](https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/):

  > Note that Visual Studio also supports EditorConfig, which works in a similar way. ClangFormat, however, has a [much larger variety of style options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) than EditorConfig, including some very C++ specific rules that can be set, and it is already used by C++ developers today.

  Having both `.editorconfig` and `.clang-format` in a project, may not always work correctly though, I think. As some editors may have a plugin for `.editorconfig` and a plugin for `clang-formatter` which may not work correctly in unison. In VS Code & Visual Studio EditorConfig [takes precedence over other settings](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/ide/cpp-editorconfig-properties.md#c-editorconfig-formatting-conventions).

  ### Possible issues

  Your editor may change formatting for some 3rd party library if you edit the code. A solution for this would be to make EditorConfig rules more specific (include only certain paths). I'm not sure if it is an issue in practice.

  ### Testing

  Add some trailing whitespace to a Python file and save the file. You should see that the trailing whitespace is removed.

  ### Possible future work

  It would be great to define rules for Makefiles. This would be good start:

  ```
  # Makefiles
  [Makefile,*.am]
  indent_style = tab
  trim_trailing_whitespace = true
  ```

  I don't know makefiles in this project good enough to propose something reasonable. If this PR is well received, it would be great to add it in this PR.

  Also, there are actually many different file extensions and so the proposed `.editorconfig` file can be probably improved very much:

  ```powershell
  Get-ChildItem -Recurse | % {$_.Extension.ToLower()} | sort | unique
  ```

  <details><summary>Click to see the output</summary>

  ```
  .1
  .ac
  .adoc
  .am
  .bash-completion
  .bat
  .bmp
  .c
  .cc
  .cert
  .cfg
  .clang_complete
  .clang-format
  .cmake
  .cmd
  .cnf
  .com
  .conf
  .cpp
  .css
  .csv
  .doxyfile
  .dtd
  .empty
  .exe
  .exp
  .gci
  .gitattributes
  .github
  .gitignore
  .gitmodules
  .guess
  .h
  .hex
  .hpp
  .html
  .icns
  .ico
  .idb
  .ilk
  .in
  .include
  .ini
  .init
  .ipp
  .jam
  .js
  .json
  .lastbuildstate
  .lib
  .list
  .log
  .m
  .m4
  .md
  .mk
  .mm
  .moc
  .obj
  .openrc
  .openrcconf
  .patch
  .pc
  .pdb
  .pl
  .plist
  .png
  .po
  .pro
  .py
  .python-version
  .qbk
  .qm
  .qml
  .qrc
  .raw
  .rb
  .rc
  .recipe
  .res
  .s
  .sage
  .sass
  .scm
  .scss
  .service
  .sgml
  .sh
  .sln
  .spec
  .sub
  .supp
  .svg
  .targets
  .td
  .tlog
  .ts
  .tx
  .txt
  .ui
  .user
  .v2
  .vcxproj
  .verbatim
  .vscode
  .xml
  .xpm
  .xsl
  .y
  .yapf
  .yml
  .yy
  ```

  </details>

  Fixes #21092

ACKs for top commit:
  laanwj:
    Tested re-ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30
  MarcoFalke:
    Approach ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30

Tree-SHA512: c36a3424ecc751fbdd66101463b0c470f5c7adcdb4795b1cd267ff718eb345a04615fc1182338adf5b7db724469dca00c64815a9ef77064734a6536fba41a2ba
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
cd3bedaf1c Merge #20557: addrman: Fix new table bucketing during unserialization
4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b [addrman] Don't repeat "Bucketing method was updated" log multiple times (John Newbery)
436292367c1d737cf73bd985293539500d1206f5 [addrman] Improve serialization comments (John Newbery)
ac3547eddd8a7d67b4103508f30d5d02a9c1f148 [addrman] Improve variable naming/code style of touched code. (John Newbery)
a5c9b04959f443372400f9a736c6eaf5502284a1 [addrman] Don't rebucket new table entries unnecessarily (John Newbery)
8062d928ce5c495c1b6ecd18e4b30c12da822d90 [addrman] Rename asmap version to asmap checksum (John Newbery)
009b8e0fdf3bfb11668edacced5d8b70726d5d0e [addrman] Improve variable naming/code style of touched code. (John Newbery)
b4c5fda417dd9ff8bf9fe24a87d384a649e3730d [addrman] Fix new table bucketing during unserialization (John Newbery)

Pull request description:

  This fixes three issues in addrman unserialization.

  1. An addrman entry can appear in up to 8 new table buckets. We store this entry->bucket indexing during shutdown so that on restart we can restore the entries to their correct buckets. Commit ec45646de9e62b3d42c85716bfeb06d8f2b507dc broke the deserialization code so that each entry could only be put in up to one new bucket.

  2. Unserialization may result in an entry appearing in a 9th bucket. If the entry already appears in 8 buckets don't try to place it in another bucket.

  3. We unnecessarily rebucket when reading a peers.dat with file version 1. Don't do that.

ACKs for top commit:
  vasild:
    ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  glozow:
    re-ACK 4676a4fb5b, changes were a rename, comments, and removing repeat-logging.
  naumenkogs:
    ACK 4676a4f
  laanwj:
    Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  dhruv:
    ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  ryanofsky:
    Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b. I'm not previously familiar with this code but all the changes here do make sense and seem like improvements. Left some notes and comments, but they aren't important so feel to ignore.

Tree-SHA512: b228984f6dec5910be23c3740ae20258da33bcf66ceb7edb10e5a53163450f743bab349e47f09808b7e8d40f27143119ec3e0981d7e678aa494d8559a1c99c23
2021-07-16 10:04:09 -05:00
MarcoFalke
12cb360247 Merge #21084: test: fix timeout decrease in feature_assumevalid
0d39b5848a7a341cd2b958336861cdd4098e2616 test: fix timeout decrease in feature_assumevalid (Bruno Garcia)

Pull request description:

  This PR fixes the timeout decrease in assert_blockchain_height function.

ACKs for top commit:
  practicalswift:
    cr ACK 0d39b5848a7a341cd2b958336861cdd4098e2616: patch looks correct
  theStack:
    ACK 0d39b5848a7a341cd2b958336861cdd4098e2616 ⏲️

Tree-SHA512: ae3c83420b4de4ad41f1b20b6e77c3a26a8c5ac4fb136b2645fde119545a413c61312f76a16473141774bc955d30ac4fc86e5ca6cf729f8978a17d0dab520feb
2021-07-16 10:04:09 -05:00
fanquake
f9ae80e2cf Merge #21065: build: make macOS HOST in download-osx generic
f22a3ec1403293f45a06558d105f0da624c5ebed build: make macOS HOST in download-osx generic (fanquake)

Pull request description:

  This was missed in #20419, and the update before that, so just make this non-versioned so that we don't have to worry about it. This is fine, because it's just for downloading sources.

ACKs for top commit:
  RandyMcMillan:
    ACK f22a3ec1403293f45a06558d105f0da624c5ebed
  dongcarl:
    utACK f22a3ec1403293f45a06558d105f0da624c5ebed

Tree-SHA512: 3a6993a69594a793a5185e4ba48858443a1002a37b96ff881d39ca7719c79432b35d709bd9a9379f8046bdbeb716c5e1598f273a7e7e3f3bf528b6a807abe5ec
2021-07-16 10:04:09 -05:00
MarcoFalke
403d2a0917 Merge bitcoin-core/gui#167: raise helpMessageDialog
77114462f2328914b7a918f40776e522a0898e56 raise helpMessageDialog (randymcmillan)

Pull request description:

  the raise() method brings the helpMessageDialog to the top if it is obscured by another window.

ACKs for top commit:
  promag:
    Code review ACK 77114462f2328914b7a918f40776e522a0898e56.
  hebasto:
    ACK 77114462f2328914b7a918f40776e522a0898e56, tested on:

Tree-SHA512: 0d5b107aa9a5ce3891e88ef69f64461c8b23d17476b798691119e84bfc78e16b2491c798adb5d6cc347af3b7f18729593d7924090c336114a3cf34fbee344bfb
2021-07-16 10:04:09 -05:00
MarcoFalke
87ea218fe2 Merge bitcoin-core/gui#173: Follow Qt docs when implementing rowCount and columnCount
195fcb53a09e9b852544778a077727f81d31303e qt: Follow Qt docs when implementing rowCount and columnCount (Hennadii Stepanov)

Pull request description:

  [`QAbstractItemModel::rowCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#rowCount):
  > **Note:** When implementing a table based model, `rowCount()` should return 0 when the parent is valid.

  [`QAbstractItemModel::columnCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#columnCount):
  > **Note:** When implementing a table based model, `columnCount()` should return 0 when the parent is valid.

ACKs for top commit:
  jarolrod:
    Tested ACK 195fcb53a09e9b852544778a077727f81d31303e. Compiled and ran on macOS (Big Sur 11.1 and Catalina 10.15.7), Arch Linux, and FreeBSD. visually verified no weird effects with the `Address`, `Ban`, `Peer`, and `Transaction` tables. As already stated, the code change brings us inline with what the QT Docs recommend.

Tree-SHA512: 179a3430e68e77b22cdf642964cd96c023a2286ee256bbeb25b43df3d2eef6f59978c8d92173c6be5071d127fdcd6aa338142f6eaf003ff08e4abd65172d20ca
2021-07-16 10:04:09 -05:00
fanquake
f827bf9d93 Merge #20763: test: Fix comment typo in BitcoinTestFramework
40fdb2a212d0a0e775114e4766d065e6d234c155 test: Fix Comment Typo in BitcoinTestFramework (Joel Klabo)

Pull request description:

  Missing "override" in comment describing use of set_test_params

ACKs for top commit:
  michaelfolkson:
    ACK 40fdb2a212d0a0e775114e4766d065e6d234c155

Tree-SHA512: bf893a0d5f8dc86a3ec2eaf48cd7c0f0f832f3b3d254b3d99953336db7e294571b1d2c8686030bf8a27cbe67b1a85a54e53ebefb2e57d6d8d6ac864a15dce4e7
2021-07-16 10:04:09 -05:00
fanquake
62fab44126 Merge #20673: depends: Use more legible qmake commands in qt package
87fe104537eab5ccd8728321fe1c9ba39f7dda78 depends: Use more legible qmake commands in qt package (Hennadii Stepanov)
bf35a8da6ec2791dedf36f459add69ac67b11ff9 depends: Do not set build_subdir for qt package (Hennadii Stepanov)

Pull request description:

  Rather than using `cd` to jump all over the place, perform all `(q)make` commands from the top level directory.

  Looking at bash like `cd ../../../..` gives me a headache.

  Credits to **fanquake**.

  This PR is an alternative to #20504 that works without any additional [non-trivial hack](https://github.com/bitcoin/bitcoin/pull/20504#issuecomment-734730336).

ACKs for top commit:
  promag:
    Tested ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78.
  fanquake:
    ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78

Tree-SHA512: 1d2a13b5358fc7406c5363ddd62fd363dbc0ec5ace68946e4d3e6e8620419afaa64ef2837488aaed226174e01e8897495085540f7126b80f8b2372d21b5b29f9
2021-07-16 10:04:09 -05:00
Jonas Schnelli
0fba9a3ecd Merge #20650: depends: Drop workaround for a fixed bug in Qt build system
267f259c0dfbd348340d49e9a89b8684b994e22a depends: Drop workaround for a fixed bug in Qt build system (Hennadii Stepanov)

Pull request description:

  This PR drops workaround that was [introduced](1dec09b341) for Qt 5.2.1 for a bug in Qt build system that has been fixed in Qt 5.3.0.

  The bug reports:
   - https://bugreports.qt.io/browse/QTBUG-35444
   - https://bugreports.qt.io/browse/QTBUG-32519

  I've noted this change is a part of the #19716, but I think that a separate commit with the documented reason will benefit it.

ACKs for top commit:
  laanwj:
    Code review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a
  jonasschnelli:
    code Review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a
  practicalswift:
    cr ACK 267f259c0dfbd348340d49e9a89b8684b994e22a: patch looks correct

Tree-SHA512: b994f94776b4f8bb2f996095c87c7fef55e74d1e64852a890d664275e3739ec890ee388b10baa15445dd24ec7b971ce57d396cb062dbed933c18b6b69525349f
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
5ff3dd1b34 Merge #20616: Check CJDNS address is valid
f7264fff0a098f8b6354c7373b8790791c25dd07 Check if Cjdns address is valid (Lucas Ontivero)

Pull request description:

  CJDNS addresses start with 0xFC and for that reason if a netaddr was unserialized with network type cjdns but its address prefix is not 0xFC then that netaddr should be considered invalid.

ACKs for top commit:
  jonatack:
    ACK f7264fff0a098f8b6354c7373b8790791c25dd07
  practicalswift:
    cr ACK f7264fff0a098f8b6354c7373b8790791c25dd07: patch looks correct
  theStack:
    ACK f7264fff0a098f8b6354c7373b8790791c25dd07 ✔️

Tree-SHA512: 5300df2ffbbd69c40271b6d8df96cca98eb3e1ee76aba62c9c76025d083788ab1f1332775890c63b06e02ca593863a867cd53956bce5962383e8450487898669
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
9ff3643bfa Merge #20482: Add depends qt fix for ARM macs
c23f6f84efa2fe7e7168a5d41341f3a7c5598f70 Add depends qt fix for ARM macs (Jonas Schnelli)

Pull request description:

  With this, depends builds fine on macOS 11 on an Apple Silicon Mac (ARM64).

ACKs for top commit:
  laanwj:
    Code review ACK c23f6f84efa2fe7e7168a5d41341f3a7c5598f70

Tree-SHA512: a8354cec99969cff9e7dab150c335050ddb4b3c93a9f12a4db5e8046f02b11ce692ac17c2b96cbbe7f380c1aa110b15b8d6d48d51bc9c560282c702e99fd8a8d
2021-07-16 10:04:09 -05:00