HomePhabricator

net: reduce LOCK(cs_main) scope in GETBLOCKTXN

Description

net: reduce LOCK(cs_main) scope in GETBLOCKTXN

Summary:
Also adds a static assertion that MAX_BLOCKTXN_DEPTH <= MIN_BLOCKS_TO_KEEP

from the PR description:

Inspired by core#26308

(backported in D13052 -- D13057)

This is a partial backport of core#26326
https://github.com/bitcoin/bitcoin/pull/26326/commits/613a45cd4b5482aedbdc7c61c839ea05996935c6

Test Plan:
With Debug:
ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18255

Details

Provenance
Andrew Toth <andrewstoth@gmail.com>Authored on May 4 2024, 19:33
PiRKCommitted on Jun 17 2025, 09:20
PiRKPushed on Jun 17 2025, 09:20
Reviewer
Restricted Project
Differential Revision
D18255: net: reduce LOCK(cs_main) scope in GETBLOCKTXN
Parents
rABC5591f629b5ef: [e.cash] Remove upgrade announcement bar
Branches
Unknown
Tags
Unknown