Commit Graph

33558 Commits

Author SHA1 Message Date
laanwj
16fa967d3c
Merge bitcoin/bitcoin#24915: lint: Convert lint-circular-dependencies.sh to Python
79635c79e0 lint: Convert lint-circular-dependencies.sh to Python (Smlep)

Pull request description:

  Here is a port of `/test/lint/lint-circular-dependencies.sh` to a Python-script as part of the request of https://github.com/bitcoin/bitcoin/issues/24783.

  It aims to provide the same output as the bash version.

ACKs for top commit:
  laanwj:
    Tested ACK 79635c79e0

Tree-SHA512: f18077018f1229dd933cfe2bf0cfe7dc7d6538961c96a83c7a1f05e0cec4b068ca05502d68410d2aa4b6864523424db386e38233735190525904c2a8e9d2ba13
2022-04-25 19:37:19 +02:00
laanwj
9eedbe98c8
Merge bitcoin/bitcoin#24815: lint: convert lint-tests.sh to python
ae0e06a439 Converted lint-tests.sh to python (TakeshiMusgrave)

Pull request description:

  Reference issue: https://github.com/bitcoin/bitcoin/issues/24783

ACKs for top commit:
  laanwj:
    Tested ACK ae0e06a439

Tree-SHA512: a118295b5b6b5199b52d46b54de871d88dd544112e7dd5001a9575d65b093af0aea390f9ad223462a4fc6a201bd8c4debe5e26bfa4860a90c97cfe300477c04a
2022-04-25 19:27:37 +02:00
laanwj
0342ae1d39
Merge bitcoin/bitcoin#24802: lint: convert format strings linter test to python
267684ee34 lint: convert format strings linter test to python (Eunoia)

Pull request description:

  Refs #24783

  Attempted to keep the style and flow of implementation as it is.

  ### Additional Notes(Optional):
  1. There is scope of improvement on how the related files are fetched. In this `git grep` with `subprocess` is still used as I found it to be the simplest. Any pointers on this are appreciated.
  2. Removed sort operation on the matching files as I couldn't think of any strong arguments to have it. Any pointers on this are appreciated.
  3. Not important, but one small detail is that the previous implementation was storing matched files for all the `function_names` iterated so far. Fixed that in this PR.

ACKs for top commit:
  laanwj:
    Code review ACK 267684ee34

Tree-SHA512: 54ceae0c3501e561fdd9c5167b2dd8dd06da1b3697a077a042210970ce7004bda8c4e19abb1905ee64cbdce635f0a078508da645846ae7e81c016091f3f02458
2022-04-25 18:32:40 +02:00
laanwj
777b89b300
Merge bitcoin/bitcoin#24929: lint: convert shell locale linter test to Python
2c838cc309 lint: convert shell locale linter test to Python (Eunoia)

Pull request description:

  Refs #24783

ACKs for top commit:
  laanwj:
    Code review ACK 2c838cc309

Tree-SHA512: 3cb5e7c7cd2acbdf0dc45096055b33cbfa0ec9e47ea567452d23a49a7441b3b62a8416879f234459c86fa892c42205c91d8a575115346c023ab0152cf713e20c
2022-04-25 18:23:02 +02:00
laanwj
8b686776ef
Merge bitcoin/bitcoin#24902: lint: Convert lint-include-guards.sh to Python
d5fdec5cf8 Convert lint-include-guards.sh to python (brydinh)

Pull request description:

  This PR addresses [issue 24783](https://github.com/bitcoin/bitcoin/issues/24783).  Converted lint-include-guards.sh to python.

ACKs for top commit:
  KevinMusgrave:
    Tested ACK d5fdec5cf8
  laanwj:
    Code review ACK d5fdec5cf8

Tree-SHA512: cae566fc1b222b447c0d60ea20fd012f1cfde4dd07c1762ede2b2c9f84ed59ee8e629db1264dab8ac20bcac410e4c389827addf0a59757f94b40a65ea9bab466
2022-04-25 18:14:54 +02:00
laanwj
c90b42bcdb
Merge bitcoin/bitcoin#24916: lint: Convert lint-python-utf8-encoding.sh to Python
035eef4be6 lint: Convert lint-python-utf8-encoding.sh to Python (Dimitri)

Pull request description:

  A port of `test/lint/lint-python-utf8-encoding.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.

ACKs for top commit:
  laanwj:
    Code review ACK 035eef4be6

Tree-SHA512: a8a2f505bf7953d318837182101346c44e73cfd1bf3b5342ff1400fb1c67c5292519fa99db1035da87cf27fb5f5ac5d28871bf55a1c085b5f8a3bb33ff0fa3fb
2022-04-25 17:58:25 +02:00
laanwj
7134327be5
Merge bitcoin/bitcoin#24932: lint: Convert lint-locale-dependence.sh to Python
3043a1bc9d lint: Make known violations more specific in lint-locale-dependence (Dimitri)
229917d3d4 lint: Convert lint-locale-dependence.sh to Python (Dimitri)

Pull request description:

  A port of `test/lint/lint-locale-dependence.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.

ACKs for top commit:
  laanwj:
    Tested and code review ACK 3043a1bc9d

Tree-SHA512: 80555cf7aac156bab5488f85098731d1c12a42667fe7d0df0c35487ab8fc951654a70a15351a759282eabab8319f5aabd8bdb153412b9edc3a9033bef64fd609
2022-04-25 17:53:53 +02:00
laanwj
e88a52e9a2
Merge bitcoin/bitcoin#24973: doc: Add 23.0 release notes
2abfb6cb09 doc: Add 23.0 release notes (laanwj)

Pull request description:

  Add 23.0 release notes from the wiki. We forgot to move these back to the branch, so they go direct-to-master.

  Only change from the wiki is to add the credits.

ACKs for top commit:
  Kvaciral:
    re-ACK 2abfb6cb09
  dunxen:
    Re-ACK  2abfb6c

Tree-SHA512: 8541cb1d258ff9a3c6a42875434ae30638343c3192b268b53b92c8abc7a09685d778c3e44d08aa10da71f87a24933c0485dbc5d32c509c699d30886d57a45aff
2022-04-25 16:14:05 +02:00
laanwj
2abfb6cb09 doc: Add 23.0 release notes 2022-04-25 15:49:59 +02:00
fanquake
10a626a1d6
Merge bitcoin/bitcoin#24955: guix: Improve error message about missed macOS SDK
914076ed5f guix: Improve error message about missed macOS SDK (Hennadii Stepanov)

Pull request description:

  The error message now mentions another option for users to specify the path to the macOS SDK.

ACKs for top commit:
  fanquake:
    ACK 914076ed5f

Tree-SHA512: e8b9a6c8aa984f02cdb4ad1eeb6c22510c0c74c47c831104ac410ef68b3bc40024a52400b5065a3e25603f8a040e72c8c464436cb9a0a018ca73b0d28e0d609d
2022-04-25 10:03:45 +01:00
fanquake
aa54132bac
Merge bitcoin/bitcoin#24454: tests: Fix calculation of external input weights
9f5ab670e7 tests: Use descriptor that requires both legacy and segwit (Andrew Chow)
8a04a386f7 tests: Calculate input weight more accurately (Andrew Chow)

Pull request description:

  The external input tests with specifying input weight would sometimes result in a test failure because it would add 2 to the calculated byte size in order to account for some of the variation in signature and script sizes. However 1 in 128 signatures are actually 1 byte smaller than we expect, so the difference between the actual signature size and our calculated size becomes 3 bytes which is outside of the tolerance of `assert_fee_amount` and would thus cause the test failure.

  To resolve this, the 2 byte buffer is reduced to 1 byte, so in the above scenario, the difference is 2 bytes which is within the tolerance of `assert_fee_amount`. Additionally, instead of putting a fixed size that we assume is the correct size for the length of the compact size length prefix of data, we actually get the length of the compact size uint.

  Lastly, the size calculation for a scriptWitness was simply incorrect and used fields that did not exist. This is fixed, and the test slightly modified so that it also produces a scriptWitness.

  Fixes #24151

ACKs for top commit:
  jonatack:
    re-ACK 9f5ab670e7
  glozow:
    code review ACK 9f5ab670e7

Tree-SHA512: b7c7ffe8fb0c07bc9e72fbff1f9ef57ee01a57c56bf54b8873345c8b9572c3ce9402b24dc211910b478114a9e6420faef5a4bf8866f38c299971354e54ec4745
2022-04-25 09:54:40 +01:00
fanquake
b31ba3abf8
Merge bitcoin/bitcoin#24948: contrib: macdeploy: fix typo in permissions
51d06df874 contrib: macdeploy: fix permissions typo in gen-sdk script (Pavol Rusnak)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/24947

ACKs for top commit:
  laanwj:
    Edit: tested ACK 51d06df874
  hebasto:
    ACK 51d06df874
  fanquake:
    ACK 51d06df874 - recreated the tarball, but didn't run a Guix build.

Tree-SHA512: c8af0690e6059b4f4f15b5b541be27cb7d92d4cedc744320a46b4df8af1fc017d124f0e8067f75cf89aa3d0662777d66e5ce7e0e9c371df6fda377d60ee5f679
2022-04-25 09:45:16 +01:00
MarcoFalke
b1c5991eeb
Merge bitcoin/bitcoin#24812: util/check: Add CHECK_NONFATAL identity function and NONFATAL_UNREACHABLE macro
ee02c8bd9a util/check: Add CHECK_NONFATAL identity function, NONFATAL_UNREACHABLE AND UNREACHABLE macros (Aurèle Oulès)

Pull request description:

  This PR replaces the macro `CHECK_NONFATAL` with an identity function.
  I simplified the usage of `CHECK_NONFATAL` where applicable in `src/rpc`.
  This function is useful in sanity checks for RPC and command-line interfaces.

  Context: https://github.com/bitcoin/bitcoin/pull/24804#discussion_r846182474.

  Also adds `UNREACHABLE_NONFATAL` macro.

ACKs for top commit:
  jonatack:
    ACK ee02c8bd9a
  MarcoFalke:
    ACK ee02c8bd9a 🍨

Tree-SHA512: 3cba09223cd7b22e62fe5d0b46c4a024c1d9957d4268ba6d3fb07fcc0a5854fc0886bb3266184e6a7df5df91373b3e84edd6adf6999c4e934aeef8c043b01aa2
2022-04-24 12:00:05 +02:00
Hennadii Stepanov
914076ed5f
guix: Improve error message about missed macOS SDK 2022-04-24 11:51:38 +02:00
Pavol Rusnak
51d06df874
contrib: macdeploy: fix permissions typo in gen-sdk script 2022-04-22 22:09:44 +02:00
Hennadii Stepanov
be7a5f2fc4
Merge bitcoin-core/gui#587: refactor: Replace GUIUtil::ObjectInvoke() with QMetaObject::invokeMethod()
6958a26aa1 Revert "qt: Add ObjectInvoke template function" (Hennadii Stepanov)
249984f4f9 qt: Replace `GUIUtil::ObjectInvoke()` with `QMetaObject::invokeMethod()` (Hennadii Stepanov)

Pull request description:

  A comment in 5659e73493 states that `GUIUtil::ObjectInvoke`
  > can be replaced by a call to the QMetaObject::invokeMethod functor overload after Qt 5.10

ACKs for top commit:
  w0xlt:
    tACK 6958a26aa1 on Ubuntu 21.10, Qt 5.15.2.
  promag:
    Code review ACK 6958a26aa1.

Tree-SHA512: 6a840289568113cf38df6c1092821d626c2d206768a21d4dc6846b9dcccb4130477adb45ba718bb6bc15a3041871a7df3238983ac03db80406732be597693266
2022-04-22 18:51:37 +02:00
fanquake
505ba39665
Merge bitcoin/bitcoin#22910: net: Encapsulate asmap in NetGroupManager
36f814c0e8 [netgroupman] Remove NetGroupManager::GetAsmap() (John Newbery)
4709fc2019 [netgroupman] Move asmap checksum calculation to NetGroupManager (John Newbery)
1b978a7e8c [netgroupman] Move GetMappedAS() and GetGroup() logic to NetGroupManager (John Newbery)
ddb4101e63 [net] Only use public CNetAddr functions and data in GetMappedAS() and GetGroup() (John Newbery)
6b2268162e [netgroupman] Add GetMappedAS() and GetGroup() (John Newbery)
19431560e3 [net] Move asmap into NetGroupManager (John Newbery)
17c24d4580 [init] Add netgroupman to node.context (John Newbery)
9b3836710b [build] Add netgroup.cpp|h (John Newbery)

Pull request description:

  The asmap data is currently owned by addrman, but is used by both addrman and connman. #22791 made the data const and private (so that it can't be updated by other components), but it is still passed out of addrman as a reference to const, and used by `CNetAddress` to calculate the group and AS of the net address.

  This RFC PR proposes to move all asmap data and logic into a new `NetGroupManager` component. This is initialized at startup, and the client components addrman and connman simply call `NetGroupManager::GetGroup(const CAddress&)` and `NetGroupManager::GetMappedAS(const CAddress&)` to get the net group and AS of an address.

ACKs for top commit:
  mzumsande:
    Code Review ACK 36f814c0e8
  jnewbery:
    CI failure seems spurious. I rebased onto latest master to trigger a new CI run, but whilst I was doing that, mzumsande ACKed 36f814c0e8, so I've reverted to that.
  dergoegge:
    Code review ACK 36f814c0e8

Tree-SHA512: 244a89cdfd720d8cce679eae5b7951e1b46b37835fccb6bdfa362856761bb110e79e263a6eeee8246140890f3bee2850e9baa7bc14a388a588e0e29b9d275175
2022-04-22 14:43:14 +01:00
Andrew Chow
9f5ab670e7 tests: Use descriptor that requires both legacy and segwit 2022-04-21 21:00:36 -04:00
Dimitri
035eef4be6 lint: Convert lint-python-utf8-encoding.sh to Python 2022-04-21 23:26:45 +02:00
Dimitri
3043a1bc9d lint: Make known violations more specific in lint-locale-dependence 2022-04-21 20:03:32 +02:00
Dimitri
229917d3d4 lint: Convert lint-locale-dependence.sh to Python 2022-04-21 19:31:41 +02:00
MarcoFalke
7a4ac713aa
Merge bitcoin/bitcoin#24936: test: compare /mempool/contents response with getrawmempool RPC
bef61496ab test: compare `/mempool/contents` response with `getrawmempool` RPC (brunoerg)
5bc5cbaf31 doc: add reference to `getrawmempool` RPC in `/mempool/contents` REST doc (brunoerg)

Pull request description:

  This PR is similar to #24797, it compares `/mempool/contents` REST response with `getrawmempool` RPC (verbose=True) since they use the same `MempoolToJSON` function.

  Also, adds a reference to `getrawmempool` RPC help to get details about the fields from `/mempool/contents`.

ACKs for top commit:
  0xB10C:
    ACK bef6149

Tree-SHA512: b7e9e9c765ee837986ba167b9234a9b95c9ef0a9ebcc2a03d50f6be6d3aba1480bd77c78111d95df1e4023cde6dfc64bf1e7908d9e5b6f96ca46b76611a4a9b4
2022-04-21 19:01:00 +02:00
laanwj
173c796268
Merge bitcoin/bitcoin#24854: Remove not needed ArithToUint256 roundtrips in tests
fad6d4f952 Remove not needed ArithToUint256 roundtrips in tests (MarcoFalke)
fa456ccb22 Remove duplicate static_asserts (MarcoFalke)

Pull request description:

  No need to go from `arith_uint256`->`uint256` when a `uint256` can be constructed right away.

ACKs for top commit:
  laanwj:
    Code review ACK fad6d4f952

Tree-SHA512: bea901ea5904bf61a0dadf7168c6b126f7e62ff1180d4aa72063c28930a01a8baa57ab0d324226bd4de72fb59559455c29c049d90061f888044198aae1426dcb
2022-04-21 18:05:47 +02:00
laanwj
2513499348
Merge bitcoin/bitcoin#24803: lint: convert submodule linter test to Python
4a9e36dbaf lint: convert submodule linter test to Python (Eunoia)

Pull request description:

  Refs #24783

ACKs for top commit:
  laanwj:
    Tested ACK 4a9e36dbaf

Tree-SHA512: ca25b59acf75cebc79588a6c51dc5c313c8d0bd1d492127815d7b81b36aaffd02815a515d97b355582002f71efc33d46435d0b28fce24497bb99799d9ba57228
2022-04-21 17:10:43 +02:00
laanwj
43bb106613
Merge bitcoin/bitcoin#24213: refactor: use Span in random.*
3ae7791bca refactor: use Span in random.* (pasta)

Pull request description:

  ~This PR does two things~
  1. use a Span<unsigned char> for GetRandBytes and GetStrongRandBytes

  ~2. make 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>()`~

  MarcoFalke this was inspired by your comment here: https://github.com/bitcoin/bitcoin/pull/24185#issuecomment-1025514263 about using Span, so hopefully I'll be able to get this PR done and merged 😂

  ~Also, if requested I could revert the `GetRand(std::numeric_limits<uint64_t>::max()` -> `GetRand<uint64_t>()` related changes if it ends up causing too many conflicts~

ACKs for top commit:
  laanwj:
    Thank you! Code review re-ACK 3ae7791bca

Tree-SHA512: 12375a83b68b288916ba0de81cfcab4aac14389a66a36811ae850427435eb67dd55e47df9ac3ec47db4e214f4330139e548bec815fff8a3f571484ea558dca79
2022-04-21 16:38:04 +02:00
MarcoFalke
346e780442
Merge bitcoin/bitcoin#24918: test: Remove unused taproot node from wallet_taproot.py
fa2153b05b test: Remove unused taproot node from wallet_taproot.py (MarcoFalke)

Pull request description:

  Now that the wallet considers taproot always active after commit 064c729a96, there is no need to test for it.

ACKs for top commit:
  dunxen:
    Code review ACK fa2153b
  brunoerg:
    crACK fa2153b05b

Tree-SHA512: 24e4a66e43d1391acb63fd0c0c52677b0eef7f618b87a5b1a75224a9be58c9c3f8bba2de3b7510f25a686865b027f7f535e653d40d519d0e00ace38f0c7aba0c
2022-04-21 14:45:22 +02:00
brunoerg
bef61496ab test: compare /mempool/contents response with getrawmempool RPC 2022-04-21 08:31:01 -03:00
fanquake
1c6fcea205
Merge bitcoin/bitcoin#24586: doc: add more info to dependencies.md
abcb8769bf  doc: add more info to dependencies.md (Pavol Rusnak)

Pull request description:

  Follow-up to https://github.com/bitcoin/bitcoin/pull/23565

  I added more info to dependencies.md - especially links to `depends/packages/*.mk` files and link to PRs where used versions were bumped.

  Preview at: https://github.com/prusnak/bitcoin/blob/dependencies/doc/dependencies.md

ACKs for top commit:
  fanquake:
    ACK abcb8769bf - I didn't click on or test all of the links, but this looks ok.

Tree-SHA512: e91deb639afebeb37f7bf05dddad8f70547b51688e938a30692e59dbd7c9e49d52b7f9bfacb74ef60c98862b6f8f444199d0ae06973c42dc647314bc1ffc22d5
2022-04-21 09:29:22 +01:00
fanquake
bfbce6cbfe
Merge bitcoin/bitcoin#24031: build: don't compress macOS DMG
1dd8cbfbc6 build: don't compress macOS DMG (fanquake)

Pull request description:

  Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small. When contrasted against the 100's of GB of blockchain data a node will download, an additional 15mb to get the release binary, isn't much additional overhead. Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again.

  `native_libdmg-hfsplus` is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some point `xorrisofs` supports compressing dmgs, we could enable that.

  Guix Build on x86_64:
  ```bash
  25b7c8bb7bc8ea014d43cebb844a842d2ac8d5a343039a820d24b649c9e6bc8a  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/SHA256SUMS.part
  16beb5c52c9bf51b5ce9ef5a0d17c0038238a833383586a1b14acbca78533e4b  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.dmg
  d8f89a61a7448d6334dbb3639386a7b6340542393933f35421a9e6dfc724e455  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.tar.gz
  11617dc261ef602433f5bb29956a40a9085dbc783f519f75fbe06e80970148d0  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin.tar.gz
  aa8550d4a394d3161d14ec5e6012ed07354135afb022e905a1946785b4665664  guix-build-1dd8cbfbc631/output/dist-archive/bitcoin-1dd8cbfbc631.tar.gz
  2b837f2f971a9738d0b7b8497f7ded740ef5e67c8baa7f30ca33e6b7d826eec8  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/SHA256SUMS.part
  db972b2c06dbde5525a3f9e6ceb9c20a8120bc9a6f15e1d852a4bfac09d88569  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.dmg
  50fe990c3f9923ee92195125faf6517396e7c1b017a8f4f7d52e991ebce52f0c  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.tar.gz
  1d9022b0ae46ead41046c40f82291ce363760660a3cd6e6ef6a5b1128b90faef  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin.tar.gz
  ```

  Guix Build on arm64:
  ```bash
  ```

ACKs for top commit:
  Sjors:
    re-tACK 1dd8cbfbc6 on Intel macOS
  laanwj:
    Build system changes code review ACK 1dd8cbfbc6, I don't know anything about MacOS application formats and their internals so do not have an opinion on the contents of this change.
  jarolrod:
    ACK 1dd8cbfbc6

Tree-SHA512: 04c5bf78f26a9877777093ec4c50c457107bef59d720839ea5e7d7e4f7961dfee9f86b40cf791524a9e60e9e77403a797e9fcdae3849b60b759f9f66cc31b6ab
2022-04-21 08:54:13 +01:00
laanwj
6f55ab57cb
Merge bitcoin/bitcoin#24534: contrib: macdeploy: make gen-sdk deterministic
ba30a5407e contrib: macdeploy: monkey-patch gen-sdk to be deterministic (Pavol Rusnak)
1868a17e5a contrib: macdeploy: make gen-sdk deterministic (Pavol Rusnak)

Pull request description:

  This PR attempts to make `contrib/macdeploy/gen-sdk` deterministic

  Can anyone with the `Xcode_12.2.xip` confirm that `gen-sdk` produces the same hash? => `e7ca56bc8804d16624fad68be2e71647747d6629cacaaa3de5fbfa7f444e9eae `

ACKs for top commit:
  laanwj:
    Tested ACK ba30a5407e
  jarolrod:
    Tested ACK ba30a5407e

Tree-SHA512: 1638ceaf28e87ef0d21a1a71ef02989f75942b60a12f07236ac709bde96f08f39f816767e35a0fe68c26bf5978e63e74f5385be9d4b8f80a2e89b30f163f4526
2022-04-21 09:38:09 +02:00
brunoerg
5bc5cbaf31 doc: add reference to getrawmempool RPC in /mempool/contents REST doc 2022-04-20 18:12:39 -03:00
Smlep
79635c79e0 lint: Convert lint-circular-dependencies.sh to Python 2022-04-20 22:40:50 +02:00
Eunoia
2c838cc309 lint: convert shell locale linter test to Python 2022-04-20 14:37:52 +00:00
brydinh
d5fdec5cf8 Convert lint-include-guards.sh to python
Specify encoding when reading header files, add docstring

Update test/lint/lint-include-guards.py  include guard count logic

Co-authored-by: Kevin Musgrave <tkm45@cornell.edu>

Update test/lint/lint-include-guards.py by removing whitespace
2022-04-20 09:52:58 -04:00
John Newbery
36f814c0e8 [netgroupman] Remove NetGroupManager::GetAsmap()
asmap no longer needs to be exposed anywhere outside NetGroupManager.
2022-04-20 14:35:53 +01:00
John Newbery
4709fc2019 [netgroupman] Move asmap checksum calculation to NetGroupManager 2022-04-20 14:35:53 +01:00
John Newbery
1b978a7e8c [netgroupman] Move GetMappedAS() and GetGroup() logic to NetGroupManager
Reviewer hint: use:

`git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`
2022-04-20 14:35:52 +01:00
John Newbery
ddb4101e63 [net] Only use public CNetAddr functions and data in GetMappedAS() and GetGroup()
Also change parameter/variable names. This makes the next commit mostly
move-only.
2022-04-20 14:35:52 +01:00
John Newbery
6b2268162e [netgroupman] Add GetMappedAS() and GetGroup()
These currently call through to the CNetAddr methods. The logic will be moved in a future commit.
2022-04-20 14:35:52 +01:00
John Newbery
19431560e3 [net] Move asmap into NetGroupManager 2022-04-20 14:29:29 +01:00
Pavol Rusnak
abcb8769bf
doc: add more info to dependencies.md 2022-04-20 15:21:50 +02:00
fanquake
094d9fda5c
Merge bitcoin/bitcoin#24788: doc: Add gpg key import instructions for Windows
107582039a doc: Add gpg key import instructions for Windows (Dave Scotese)

Pull request description:

  This is a single commit to replace the three commits from #23916

  I propose this change so that Windows users can more easily import signers' keys.

ACKs for top commit:
  sipsorcery:
    tACK 107582039a.

Tree-SHA512: 7d4ec77ce10f751748c49f1453fa8baf0976b15af4f87dc27f4e2715ad73fbd7dc1f07fcf3e660d63a6b9eb895a5e4105774613d39a2328f73b92d9e6cff4ebd
2022-04-20 11:41:19 +01:00
MarcoFalke
dbdc83ae01
Merge bitcoin/bitcoin#24909: refactor: Move and rename pindexBestHeader, fHavePruned
f0a2fb3c5d scripted-diff: Rename pindexBestHeader, fHavePruned (Carl Dong)
a401402125 Clear fHavePruned in BlockManager::Unload() (Carl Dong)
3308ecd3fc move-mostly: Make fHavePruned a BlockMan member (Carl Dong)
c96524113c Clear pindexBestHeader in ChainstateManager::Unload() (Carl Dong)
73eedaaacc style-only: Miscellaneous whitespace changes (Carl Dong)
0d567daf23 move-mostly: Make pindexBestHeader a ChainMan member (Carl Dong)
5d670173a3 validation: Load pindexBestHeader in ChainMan (Carl Dong)

Pull request description:

  Split off from #22564 per Marco's suggestion: https://github.com/bitcoin/bitcoin/pull/22564#issuecomment-1100011503

  This is basically the move-mostly parts of #22564. The overall intent is to move mutable globals manually reset by `::UnloadBlockIndex` into appropriate structs such that they are cleared at the appropriate times. Please read #22564's description for more rationale.

  In summary , this PR moves:
  1. `pindexBestHeader` -> `ChainstateManager::m_best_header`
  2. `fHavePruned` -> `BlockManager::m_have_pruned`

ACKs for top commit:
  ajtowns:
    ACK f0a2fb3c5d -- code review only
  MarcoFalke:
    kirby ACK f0a2fb3c5d 😋

Tree-SHA512: 8d161701af81af1ff42da1b22a6bef2f8626e8642146bc9c3b27f3a7cd24f4d691910a2392b188ae058fec0611a17304dd73f60da695f53832d327f73d2fc963
2022-04-20 12:13:25 +02:00
MarcoFalke
fc99f8c09e
Merge bitcoin/bitcoin#24895: lint: Convert lint-includes.sh to Python
67b41678c8 lint: Convert lint-includes.sh to Python (Dimitri)

Pull request description:

  A port of `test/lint/lint-includes.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.

ACKs for top commit:
  KevinMusgrave:
    Tested ACK 67b41678c8

Tree-SHA512: 05b4b114dc101e571004aee8aea1480e4dda1dc645426100649e9cb81e56e8667f88d6d5646a9860ea1c7abc36754eda2a77ec10156c54b62db00e2c00b8ceae
2022-04-20 09:55:33 +02:00
Eunoia
4a9e36dbaf lint: convert submodule linter test to Python 2022-04-20 05:21:13 +00:00
Carl Dong
f0a2fb3c5d scripted-diff: Rename pindexBestHeader, fHavePruned
...to m_best_header and m_have_pruned

-BEGIN VERIFY SCRIPT-
find_regex="\bpindexBestHeader\b" \
    && git grep -l -E "$find_regex" -- src \
        | xargs sed -i -E "s@$find_regex@m_best_header@g"
find_regex="\bfHavePruned\b" \
    && git grep -l -E "$find_regex" -- src \
        | xargs sed -i -E "s@$find_regex@m_have_pruned@g"
-END VERIFY SCRIPT-
2022-04-19 14:36:18 -04:00
Carl Dong
a401402125 Clear fHavePruned in BlockManager::Unload()
-----

Code Reviewer Notes

Call graph of relevant functions:

UnloadBlockIndex() <-- Moved from
    calls ChainstateManager::Unload()
        which calls BlockManager::Unload() <-- Moved to

So calling UnloadBlockIndex() would still run this moved code. The code
will also now run when ~BlockManager gets called, which makes sense.
2022-04-19 14:34:56 -04:00
Carl Dong
3308ecd3fc move-mostly: Make fHavePruned a BlockMan member
[META] In the next commit, we move the clearing of fHavePruned to
       BlockManager::Unload()
2022-04-19 14:34:56 -04:00
Carl Dong
c96524113c Clear pindexBestHeader in ChainstateManager::Unload()
-----

Code Reviewer Notes

Call graph of relevant functions:

UnloadBlockIndex() <-- Moved from
    calls ChainstateManager::Unload() <-- Moved to

Safe because ChainstateManager::Unload() is called only by
UnloadBlockIndex() and no other callers.
2022-04-19 14:34:56 -04:00
Carl Dong
73eedaaacc style-only: Miscellaneous whitespace changes
...of touched lines and surrounding
2022-04-19 14:34:56 -04:00