Commit Graph

45170 Commits

Author SHA1 Message Date
Matthew Zipkin
f16c8c67bf tests: Expand HTTP coverage to assert libevent behavior
Covers:
- http pipelining
- rpcservertimeout

  Testing this requires adding an option to TestNode to force
  the test framework to establish a new HTTP connection for
  every RPC. Otherwise, attempting to reuse a persistent connection
  would cause framework RPCs during startup and shutdown to fail.

- "chunked" Transfer-Encoding
2025-05-21 10:47:23 -04:00
MarcoFalke
fac00d4ed3 doc: Move CI-must-pass requirement into readme section
Seems fine to state it clearly once.
2025-05-21 16:19:40 +02:00
MarcoFalke
fab79c1a25 doc: Clarify and move "hygienic commit" note
The prior version mentions to update the tests *first*, which is wrong.
It must be updated at the same time in the same commit.
2025-05-21 16:19:24 +02:00
MarcoFalke
fac8b05197 doc: Clarify strprintf size specifier note 2025-05-21 16:19:04 +02:00
MarcoFalke
faaf34ad72 doc: Remove section about RPC alias via function pointer
This is no longer possible with RPCHelpMan.
2025-05-21 16:18:36 +02:00
MarcoFalke
2222d61e1c doc: Remove section about RPC arg names in table
The table no longer holds arg names. This is done automatically by
RPCHelpMan.
2025-05-21 16:17:58 +02:00
MarcoFalke
fa00b8c02c doc: Remove section about include guards 2025-05-21 16:17:51 +02:00
MarcoFalke
fad6cd739b doc: Remove dev note section on includes 2025-05-21 16:17:45 +02:00
MarcoFalke
fa6623d85a doc: Remove file name section
This is already checked by test/lint/lint-files.py

There is no need to reword all linters into the dev notes.
2025-05-21 16:17:39 +02:00
MarcoFalke
7777fb8bc7 doc: Remove shebang section
This is already checked by test/lint/lint-files.py

There is no need to reword all linters into the dev notes.

Also, allow scripts in Rust (there are already some).
2025-05-21 16:17:14 +02:00
MarcoFalke
faf65f0531 doc: Remove .gitignore section
This was added to the gitignore file itself in commit
fada115cbe. The past violations are
evidence that the note in the dev notes was missed anyway.
2025-05-21 16:17:04 +02:00
MarcoFalke
faf2094f25 doc: Remove note about removed ParsePrechecks 2025-05-21 16:16:55 +02:00
merge-script
87ec923d3a Merge bitcoin/bitcoin#32475: wallet: Use util::Error throughout AddWalletDescriptor instead of returning nullptr for some errors
785e1407b0 wallet: Use util::Error throughout AddWalletDescriptor (Ava Chow)

Pull request description:

  #32023 changed `AddWalletDescriptor` to return `util::Error`, but did not change all of the failure cases to do so. This may result in some callers continuing when there was actually an error. Unify all of the failure cases to use `util::Error` so that all callers handle `AddWalletDescriptor` errors in the same way.

  The encapsulated return type is changed from `ScriptPubKeyMan*` to `std::reference_wrapper<DescriptorScriptPubKeyMan>`. This avoids having a value that can be interpreted as a bool, and also removes the need to constantly dynamic_cast the returned value. The only kind of `ScriptPubKeyMan` that can come out of `AddWalletDescriptor` is a `DescriptorScriptPubKeyMan` anyways.

ACKs for top commit:
  Sjors:
    utACK 785e1407b0
  ryanofsky:
    Code review ACK 785e1407b0
  furszy:
    Code review ACK 785e1407b0

Tree-SHA512: 52a48263c8d4161a8c0419b7289c25b0986f8e3bcd10b639eeeb0b6862d08b6c5e70998d20070ab26b39ecd90ab83dc8b71c65d85f70626282cf8cc6abff50e7
2025-05-21 14:24:39 +01:00
merge-script
7763e86afa Merge bitcoin/bitcoin#32573: ci: Avoid && dropping errors
fab97f583f ci: Avoid && dropping errors (MarcoFalke)

Pull request description:

  In bash, `&&` will ignore errexit. This can lead to silently ignoring errors. Compare the output of:

  ```
  $ bash -c 'set -xe;   false && false   ; true; echo $?'
  + false
  + true
  + echo 0
  0
  ```

  In theory this could be fixed by using a subshell:

  ```
  $ bash -c 'set -xe; ( false && false ) ; true; echo $?'
  + false
  ```

  However, it is easier to just remove the `&&`.

  This was introduced in  commit faa807bdf8

ACKs for top commit:
  janb84:
    Code review ACK fab97f583f
  hebasto:
    ACK fab97f583f.
  laanwj:
    ACK fab97f583f

Tree-SHA512: 9d034829e03ef3aefdaad82c3cab59bf3fe18529762271c1ad3c838357e337e94bd403b77e30c0cf69715254b65addff6d12f2fb497d7a0e2cdcbcbf78858d47
2025-05-21 12:11:49 +01:00
merge-script
0a56ed1ac8 Merge bitcoin/bitcoin#32567: subprocess: Backport upstream changes
e63a7034f0 subprocess: Don't add an extra whitespace at end of Windows command line (laanwj)

Pull request description:

  A list of the backported PRs:
  - https://github.com/arun11299/cpp-subprocess/pull/119

  The following PRs were skipped for backporting:
  - https://github.com/arun11299/cpp-subprocess/pull/118 because there is no changes in the header code.

  Required for https://github.com/bitcoin/bitcoin/pull/32566.

ACKs for top commit:
  laanwj:
    Code review ACK e63a7034f0

Tree-SHA512: 69a74aa7f9c611a9ec910e27161c5e9e147067d37f8335953cd3875fcc88dc840a2f7b206bb603f22507159e406b1449f1dc4702fffe890bb824672641b4feed
2025-05-21 12:08:36 +01:00
merge-script
54e406a305 Merge bitcoin/bitcoin#32459: qt: drop unused watch-only functionality
e8661aac75 wallet: drop watch-only things from interface (Sjors Provoost)
e99188e7da qt: drop unused watch-only functionality (Sjors Provoost)

Pull request description:

  The watch-only functionality in the GUI was only used for legacy wallets. Watch-only descriptor wallets do not use this.

  The only visible changes of this PR should be:
  - dropped "Spendable:" label from the overview tab
  - column width cache is reset

  This PR also removes some unused variables from the interface.

ACKs for top commit:
  davidgumberg:
    Review ACK e8661aac75.
  hebasto:
    ACK e8661aac75, I have reviewed the code and it looks OK. The `src/qt/forms/overviewpage.ui` form was reviewed in Qt Designer.

Tree-SHA512: d7edb0f167e0b934075398a76eddca69890bb36848a918c932b1c2cea85ee87285e876cbfdf1f6dec7adf26b9f405fb558c70bec0c84585c0a9df33c2af78393
2025-05-21 10:13:00 +01:00
merge-script
ec81204694 Merge bitcoin/bitcoin#31622: psbt: add non-default sighash types to PSBTs and unify sighash type match checking
ee045b61ef rpc, psbt: Require sighashes match for descriptorprocesspsbt (Ava Chow)
2b7682c372 psbt: use sighash type field to determine whether to remove non-witness utxos (Ava Chow)
28781b5f06 psbt: Add sighash types to PSBT when not DEFAULT or ALL (Ava Chow)
15ce1bd73f psbt: Enforce sighash type of signatures matches psbt (Ava Chow)
1f71cd337a wallet: Remove sighash type enforcement from FillPSBT (Ava Chow)
4c7d767e49 psbt: Check sighash types in SignPSBTInput and take sighash as optional (Ava Chow)
a118256948 script: Add IsPayToTaproot() (Ava Chow)
d6001dcd4a wallet: change FillPSBT to take sighash as optional (Ava Chow)
e58b680923 psbt: Return PSBTError from SignPSBTInput (Ava Chow)
2adfd81532 tests: Test PSBT sighash type mismatch (Ava Chow)
5a5d26d612 psbt: Require ECDSA signatures to be validly encoded (Ava Chow)

Pull request description:

  Currently, we do not add the sighash field to PSBTs at all, even when we have signed with a non-default sighash. This PR changes the behavior such that when we (attempt to) sign with a sighash other than DEFAULT or ALL, the sighash type field will be added to the PSBT to inform the later signers that a different sighash type was used by a signer. Notably, this is necessary for MuSig2 support as all signers must sign using the same sighash type, but the sighash is not provided in partial signatures.

  Furthermore, because the sighash type can also be provided on the command line, we require that if both a command line sighash type and the sighash field is present, they must specify the same sighash type. However, this was being checked by the wallet, rather than the signing code, so the `descriptorprocesspsbt` RPC was not enforcing this restriction at all, and in fact ignored the sighash field entirely. This PR refactors the checking code so that the underlying PSBT signing function `SignPSBTInput` does the check.

ACKs for top commit:
  theStack:
    re-ACK ee045b61ef
  rkrux:
    re-ACK ee045b61ef
  fjahr:
    Code review ACK ee045b61ef

Tree-SHA512: 4ead5be1ef6756251b827f594beba868a145d75bf7f4ef6f15ad21f0ae4b8d71b38c83494e5a6b75f37fadd097178cddd93d614b962a2c72fc134f00ba2f74ae
2025-05-21 10:02:49 +01:00
MarcoFalke
fab97f583f ci: Avoid && dropping errors 2025-05-20 21:38:07 +02:00
Ava Chow
9a887baade Merge bitcoin/bitcoin#32344: Wallet: Fix Non-Ranged Descriptors with Range [0,0] Trigger Unexpected Wallet Errors in AddWalletDescriptor
97d383af6d Test updating non-ranged descriptor with [0,0] range succeeds (Novo)
2ae1788dd4 Skip range verification for non-ranged desc (Novo)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/31728

  This PR updates the `DescriptorScriptPubKeyMan` to skip range checks for non-ranged descriptors, which previously caused errors when updating a non-ranged descriptor with the range [0,0]

  #### Testing
  A unit test was added to test the new behaviour

ACKs for top commit:
  achow101:
    ACK 97d383af6d
  rkrux:
    ACK 97d383a

Tree-SHA512: 6dbd058376d9e57d26477d9d6d89646e80a32e3ffcc9f4e30eeda273575d12583ce520cc0032cc67c12ea0b3ad344fbd3945d9fc5e389b6a6bce1ea7ad5d6e59
2025-05-20 12:30:52 -07:00
Ava Chow
26fba39bda Merge bitcoin/bitcoin#32466: threading: drop CSemaphore in favor of c++20 std::counting_semaphore
6f7052a7b9 threading: semaphore: move CountingSemaphoreGrant to its own header (Cory Fields)
fd15469892 threading: semaphore: remove temporary convenience types (Cory Fields)
1f89e2a49a scripted-diff: threading: semaphore: use direct types rather than the temporary convenience ones (Cory Fields)
f21365c4fc threading: replace CountingSemaphore with std::counting_semaphore (Cory Fields)
1acacfbad7 threading: make CountingSemaphore/CountingSemaphoreGrant template types (Cory Fields)
e6ce5f9e78 scripted-diff: rename CSemaphore and CSemaphoreGrant (Cory Fields)
793166d381 wallet: change the write semaphore to a BinarySemaphore (Cory Fields)
6790ad27f1 scripted-diff: rename CSemaphoreGrant and CSemaphore for net (Cory Fields)
d870bc9451 threading: add temporary semaphore aliases (Cory Fields)
7b816c4e00 threading: rename CSemaphore methods to match std::semaphore (Cory Fields)

Pull request description:

  This is relatively simple, but done in a bunch of commits to enable scripted diffs.

  I wanted to add a semaphore in a branch I've been working on, but it was unclear if I should use `std::counting_semaphore` or stick with our old `CSemaphore`. I couldn't decide, so I just decided to remove all doubt and get rid of ours :)

  This replaces our old `CSemaphore` with `std::counting_semaphore` everywhere we used it. `CSemaphoreGrant` is still there as an RAII wrapper, but is now called `CountingSemaphoreGrant` and `BinarySemaphoreGrant` to match. Those have been moved out of `sync.h` to their own file.

ACKs for top commit:
  purpleKarrot:
    ACK 6f7052a7b9
  achow101:
    ACK 6f7052a7b9
  TheCharlatan:
    ACK 6f7052a7b9
  hebasto:
    ACK 6f7052a7b9, I have reviewed the code and it looks OK.

Tree-SHA512: 5975d13aa21739174e3a22c544620ae3f36345f172b51612346d3b7baf0a07c39ef6fd54f647c87878c21a67951b347a5d4a5f90e897f3f6c0db360a3779d0df
2025-05-20 12:21:17 -07:00
Ava Chow
878556947b Merge bitcoin/bitcoin#32333: doc: Add missing top-level description to pruneblockchain RPC
135a0f0aa7 doc: Add missing top-level description to pruneblockchain RPC (nervana21)

Pull request description:

  Previously, the `pruneblockchain` RPC help output included only the method signature and arguments, with no top-level description explaining its purpose or constraints.

  This PR adds a top-level description, improving documentation consistency and alerting users to the potential impacts of using the command.

ACKs for top commit:
  maflcko:
    lgtm ACK 135a0f0aa7
  yancyribbens:
    cr ACK 135a0f0aa7
  achow101:
    ACK 135a0f0aa7
  janb84:
    re ACK [135a0f0](135a0f0aa7)

Tree-SHA512: e51475238e779555315668b7389ed312a5d2c4ad1c0b251f2314895ac473092fa458b6f931f70385e14047adb7e340e44fe2198643603da9e129f1c874578a28
2025-05-20 12:02:54 -07:00
Cory Fields
fd290730f5 validation: clean up and clarify CheckInputScripts logic
CheckInputScripts behaves differently depending on whether or not it was called
with a vector for checks. Make this difference clear by calling it differently
depending on whether or not control exists. Though more verbose, it should be
more straightforward to understand what's happening this way.

Also remove parallel_script_checks, as `if(control)` is a better test.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2025-05-20 18:24:34 +00:00
MarcoFalke
fa69c5b170 doc: Remove -disablewallet from dev notes
No setting should crash. Most settings are tested as part of the
functional test suite, including -disablewallet.
2025-05-20 18:36:59 +02:00
fanquake
df9ebbf659 depends: use "mkdir -p" when installing xproto
It looks like the mkdir detection in xproto is broken on Alpine. Ensure
we always use `mkdir -p`.

Fixes #32494.
2025-05-20 16:01:32 +01:00
merge-script
fad009af49 Merge bitcoin/bitcoin#32520: Remove legacy Parse(U)Int*
faf55fc80b doc: Remove ParseInt mentions in documentation (MarcoFalke)
3333282933 refactor: Remove unused Parse(U)Int* (MarcoFalke)
fa84e6c36c bitcoin-tx: Reject + sign in MutateTxDel* (MarcoFalke)
face2519fa bitcoin-tx: Reject + sign in vout parsing (MarcoFalke)
fa8acaf0b9 bitcoin-tx: Reject + sign in replaceable parsing (MarcoFalke)
faff25a558 bitcoin-tx: Reject + sign in locktime (MarcoFalke)
dddd9e5fe3 bitcoin-tx: Reject + sign in nversion parsing (MarcoFalke)
fab06ac037 rest: Use SAFE_CHARS_URI in SanitizeString error msg (MarcoFalke)
8888bb499d rest: Reject + sign in /blockhashbyheight/ (MarcoFalke)
fafd43c691 test: Reject + sign when parsing regtest deployment params (MarcoFalke)
fa123afa0e Reject + sign when checking -ipcfd (MarcoFalke)
fa479857ed Reject + sign in SplitHostPort (MarcoFalke)
fab4c2967d net: Reject + sign when parsing subnet mask (MarcoFalke)
fa89652e68 init: Reject + sign in -*port parsing (MarcoFalke)
fa9c45577d cli: Reject + sign in -netinfo level parsing (MarcoFalke)
fa98041325 refactor: Use ToIntegral in CreateFromDump (MarcoFalke)
fa23ed7fc2 refactor: Use ToIntegral in ParseHDKeypath (MarcoFalke)

Pull request description:

  The legacy int parsing is problematic, because it accepts the `+` sign for unsigned integers. In all cases this is either:

  * Useless, because the `+` sign was already rejected.
  * Erroneous and inconsistent, when third party parsers reject it. (C.f. https://github.com/bitcoin/bitcoin/pull/32365)
  * Confusing, because the `+` sign is  neither documented, nor can it be assumed to be present.

  Fix all issues by removing the legacy int parsing.

ACKs for top commit:
  stickies-v:
    re-ACK faf55fc80b
  brunoerg:
    code review ACK faf55fc80b

Tree-SHA512: a311ab6a58fe02a37741c1800feb3dcfad92377b4bfb61b433b2393f52ba89ef45d00940972b2767b213a3dd7b59e5e35d5b659c586eacdfe4e565a77b12b19f
2025-05-20 15:55:38 +01:00
Greg Sanders
f66b14d2ec test: fix pushdata scripts
The original scripts were done incorrectly,
so they are changed to represent two
different 2-byte pushes.
2025-05-20 10:39:39 -04:00
merge-script
0f9baba0fb Merge bitcoin/bitcoin#29868: Reintroduce external signer support for Windows
3a18075aed ci: Drop `-DENABLE_EXTERNAL_SIGNER=ON` configure option (Hennadii Stepanov)
719fa9f4ef build: Re-enable external signer support for Windows (Hennadii Stepanov)
6e5fc2bf9b test: Reintroduce Windows support in `system_tests/run_command` test (Hennadii Stepanov)

Pull request description:

  This PR partially reverts:
  - https://github.com/bitcoin/bitcoin/pull/28967
  - https://github.com/bitcoin/bitcoin/pull/29489

  After this PR, we can proceed to actually remove the [unused code](https://github.com/bitcoin/bitcoin/pull/28981#pullrequestreview-1991272752) from `src/util/subprocess.h`.

ACKs for top commit:
  Sjors:
    ACK 3a18075aed.
  theStack:
    Light ACK 3a18075aed
  laanwj:
    Code review and lightly tested ACK 3a18075aed

Tree-SHA512: 00d200685906e716750aae7cffa0794cca451653738ea590f50dfa28e1f3c5762a9be0ae0917aa0cf7436f00fe1e565236bff2853896530a5879466f7f45cb25
2025-05-20 12:24:34 +01:00
merge-script
cf2cbfac65 Merge bitcoin/bitcoin#32553: wallet: Fix logging of wallet version
4b2cd0b41f test: check that creating a wallet does not log version info (Ava Chow)
39a483c8e9 test: Check that the correct versions are logged on wallet load (Ava Chow)
359ecd3704 walletdb: Log the wallet version after it has been read from disk (Ava Chow)

Pull request description:

  The wallet's version (in the minversion record) needs to be logged only after we have read it from disk. Otherwise, we always log the lowest version number of 10500 which is incorrect. Furthermore, it doesn't make sense to log the last client version number if the record didn't exist. This is a regression caused by #26021.

  The wallet file version logging is moved inside of `LoadMinVersion` so that it is logged after the record is read. It will also log unconditionally if a version is read so that the version number is reported even when there is an error. The last client logging is split into its own log line that will only occur if a last client record is read. The only situation where we expect no version numbers to be logged is when a wallet is being created.

  A test is added in the second commit to check that the version number is correctly logged on loading. This commit can be cherrypicked to master to verify that it fails there. The last commit adds an additional check that creating a new wallet does not log any version info at all.

ACKs for top commit:
  laanwj:
    Code review ACK 4b2cd0b41f
  janb84:
    ACK 4b2cd0b41f
  furszy:
    ACK 4b2cd0b41f
  rkrux:
    ACK 4b2cd0b41f

Tree-SHA512: b30c76f414d87be6c14b42d2d3c8794a91a7e8601501f4c24641d51ff2b5c5144776563baf41ca1c38415844740b760b19a3e5791f78013b39984dfedd3b1de7
2025-05-20 12:22:25 +01:00
merge-script
bc4b04c5bf Merge bitcoin/bitcoin#31864: doc: add missing copyright headers
c7c3bfadfc doc: add & amend copyright headers (fanquake)
f667000c83 contrib: remove outdated entries from copyright_header.py (fanquake)
0817f2d6cf doc: update MIT license URL (fanquake)
6854497b47 contrib: remove GPL-3+ from debian/copyright (fanquake)

Pull request description:

  Add & amends a number of copyright headers.
  Remove some now obselete doc/code.

ACKs for top commit:
  willcl-ark:
    ACK c7c3bfadfc

Tree-SHA512: 746ca4217e310f7f907fcd5d1e03d481b65045d57048b892a2c993be690898b6681fe6003b4f6a448b551c0ddcb32cad07998de208284a64cc4853fd4d63df52
2025-05-20 12:18:42 +01:00
laanwj
e63a7034f0 subprocess: Don't add an extra whitespace at end of Windows command line
The windows code adds an unnecessary extra space to the command line.
This can cause subtle issues, so avoid it.

Github-Pull: arun11299/cpp-subprocess#119
Rebased-From: 777cfa77d1f84bb08b3e445d5f7fc6c87282223b
2025-05-20 12:10:10 +01:00
Hennadii Stepanov
800b7cc42c cmake: Add missed SSE41_CXXFLAGS 2025-05-20 11:14:17 +01:00
Hennadii Stepanov
028476e71f cmake: Remove ENABLE_ARM_SHANI from bitcoin-build-config.h
`ENABLE_ARM_SHANI` is already conditionally defined for the
`bitcoin_crypto` target, so defining it in `bitcoin-build-config.h` is
redundant.
2025-05-20 11:14:17 +01:00
Hennadii Stepanov
1e900528d2 cmake: Remove ENABLE_X86_SHANI from bitcoin-build-config.h
`ENABLE_X86_SHANI` is already conditionally defined for the
`bitcoin_crypto` target, so defining it in `bitcoin-build-config.h` is
redundant.
2025-05-20 11:12:56 +01:00
Hennadii Stepanov
8689628e2e cmake: Remove ENABLE_AVX2 from bitcoin-build-config.h
`ENABLE_AVX2` is already conditionally defined for the `bitcoin_crypto`
target, so defining it in `bitcoin-build-config.h` is redundant.
2025-05-20 11:12:56 +01:00
Hennadii Stepanov
a8e2342dca cmake: Remove ENABLE_SSE41 from bitcoin-build-config.h
`ENABLE_SSE41` is already conditionally defined for the `bitcoin_crypto`
target, so defining it in `bitcoin-build-config.h` is redundant.
2025-05-20 11:12:49 +01:00
MarcoFalke
fa76b378e4 rpc: Round verificationprogress to exactly 1 for a recent tip
This requires a new lock annotation, but all relevant callers already
held the lock.
2025-05-20 11:17:29 +02:00
MarcoFalke
faf6304bdf test: Use mockable time in GuessVerificationProgress
Also add a test.
2025-05-20 11:16:35 +02:00
fanquake
c7c3bfadfc doc: add & amend copyright headers 2025-05-20 09:43:21 +01:00
fanquake
f667000c83 contrib: remove outdated entries from copyright_header.py 2025-05-20 09:30:41 +01:00
fanquake
0817f2d6cf doc: update MIT license URL 2025-05-20 09:30:41 +01:00
fanquake
6854497b47 contrib: remove GPL-3+ from debian/copyright
This is unused.
2025-05-20 09:30:41 +01:00
merge-script
af65fd1a33 Merge bitcoin/bitcoin#32560: ci: Move DEBUG=1 to centos task
fa58d6cdab ci: Move DEBUG=1 to centos task (MarcoFalke)

Pull request description:

  The glibcxx debug mode has many bugs in prior gcc releases:

  * https://github.com/bitcoin/bitcoin/issues/32524#issuecomment-2890411766
  * https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875
  * ...

  Instead of working around all of them, just use the existing `ci_native_centos` task with gcc-14 to have it enabled. This also follows the logic of other sanitizers (tsan, asan, ubsan, msan, valgrind, ...) to generally prefer the latest version of the sanitizer for the latests features and bugfixes.

  Fixes #32524.

  Also, while touching the `ci_native_previous_releases`, increase g0 to g2, so that it is easier for developers to use gdb inside the CI without having to re-compile

ACKs for top commit:
  hebasto:
    ACK fa58d6cdab.
  fanquake:
    ACK fa58d6cdab

Tree-SHA512: 26f151887bc39e88353b4ba1f91e913b830d24eac258b7caa0027aa592595150d5e713ededa3ed15a1b84165a94b14b0bfe3eb2fb7314d261d972b63ce01af43
2025-05-20 09:29:56 +01:00
merge-script
548f6b8cde Merge bitcoin/bitcoin#32562: doc: remove // for ... comments
7193245cd6 doc: remove For ... comments (fanquake)
1b9cdc933f net: drop win32 ifdef (fanquake)
19ba499b1f init: cerrno is used on all platforms (fanquake)

Pull request description:

  We don't add or maintain these, and they are of little value, as
  well as having the effect of polluting diffs, if changed.

  They are also wrong, i.e `DEFAULT_SCRIPTCHECK_THREADS` is not in
  `validation.h`.

ACKs for top commit:
  stickies-v:
    re-ACK 7193245cd6
  fjahr:
    ACK 7193245cd6
  willcl-ark:
    reACK 7193245cd6

Tree-SHA512: 6b5f83cd1df699356e1cbb78949f8d456b13ce288f0064138118cfb45b4c77e2d1945babe91598dffe9823ab07dfae36f4c3b61c586cf98baf16890bdf322b08
2025-05-20 09:28:46 +01:00
merge-script
7c87a0e3fb Merge bitcoin/bitcoin#32477: lint: Check for missing trailing newline
fa9198af55 lint: Check for missing trailing newline (MarcoFalke)
fa2b2aa27c lint: Add archived notes to default excludes (MarcoFalke)

Pull request description:

  A missing trailing newline is harmless, but a bit problematic:

  * `git` shows a warning by default
  * After another line is appended, the diff will be verbose and `git blame` will be wrong for the "untouched" line.

  Fix the problems by just requiring what is already the default, see also 663a9cabf8/.editorconfig (L9) and 663a9cabf8/test/lint/test_runner/src/main.rs (L327)

ACKs for top commit:
  l0rinc:
    utACK fa9198af55
  fanquake:
    ACK fa9198af55

Tree-SHA512: d144eebdeee68fc3404aa4a66ecd5c130f907ed4b869bd300f6e9ed74d125561d1f4cdd6dd20d9e969471a7d007399f928f072d1c1f626275ca31f32bc23fdbc
2025-05-20 09:25:09 +01:00
MarcoFalke
faf55fc80b doc: Remove ParseInt mentions in documentation
In the dev notes, remove the whole section, because:

* ParseDouble was removed in commit
  fa9d72a794
* The locale-dependent atoi is already checked by
  test/lint/lint-locale-dependence.py

Co-authored-by: Fabian Jahr <fjahr@protonmail.com>
2025-05-20 06:50:50 +02:00
Ava Chow
785e1407b0 wallet: Use util::Error throughout AddWalletDescriptor
32023 changed AddWalletDescriptor to return util::Error, but did not
change all of the failure cases to do so. This may result in some
callers continuing when there was actually an error. Unify all of the
failure cases to use util::Error so that all callers handle
AddWalletDescriptor errors in the same way.

The encapsulated return type is changed from ScriptPubKeyMan* to
std::reference_wrapper<DescriptorScriptPubKeyMan>. This avoids having a
value that can be interpreted as a bool, and also removes the need to
constantly dynamic_cast the returned value. The only kind of
ScriptPubKeyMan that can come out of AddWalletDescriptor is a
DescriptorScriptPubKeyMan anyways.
2025-05-19 18:09:56 -07:00
Cory Fields
1a37507895 validation: use a lock for CCheckQueueControl
Uses an RAII lock for the exact same behavior as the old critical sections.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2025-05-19 22:06:48 +00:00
Cory Fields
c3b0e6c7f4 validation: make CCheckQueueControl's CCheckQueue non-optional
This simplifies the construction logic and will allow the constructor and
destructor to lock and unlock uncondiationally.
2025-05-19 22:06:48 +00:00
Cory Fields
4c8c90b556 validation: only create a CCheckQueueControl if it's actually going to be used
This will allow CCheckQueueControl to require a CCheckQueue.
2025-05-19 22:06:48 +00:00
Cory Fields
11fed833b3 threading: add LOCK_ARGS macro
This is useful for initializing locks in a constructor.
2025-05-19 21:59:43 +00:00