This is a backport of core#26762 (partial) and core#19710 (bugfix for benchmarks on single core systems)
https://github.com/bitcoin/bitcoin/pull/26762/changes/9cf89f7a5b81197e38f58b24be0793b28fe41477
Depends on D20426
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC6c3142045e23: refactor: Make `CCheckQueue` constructor start worker threads
ninja all check-all bench-bitcoin bitcoin-fuzzers
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) The GIL can't stop these rabbit threads.
────────────────────────────────────────────────────────────────────────
minor [Stability & Availability] → ]8;;vscode://file//work/src/checkqueue.h:155src/checkqueue.h:155-158]8;; Guard direct CCheckQueue construction against negative thread counts. ChainstateManager clamps configured values, but direct callers can still pass -1. The conversion at reserve requests an extremely large capacity and throws std::length_error. Add an explicit non-negative check and a direct-constructor regression test.
────────────────────────────────────────────────────────────────────────
minor [Functional Correctness] → ]8;;vscode://file//work/src/bench/bench.cpp:85src/bench/bench.cpp:85-87]8;; Guard complexityBigO() when bench.results() is empty. CCheckQueueSpeedPrevectorJob returns on one-core hosts. nanobench 4.3.11 then fits an empty range and emits non-finite values. Guard the asymptote calculation before calling complexityBigO().
────────────────────────────────────────
Review complete
2 findings ✔
Minor 2
7 files reviewed:
- src/bench/bench.cpp
- src/bench/checkqueue.cpp
- src/checkqueue.h
- src/test/checkqueue_tests.cpp
- src/test/fuzz/checkqueue.cpp
- src/test/transaction_tests.cpp
- src/validation.cpp
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts