Latest changes, scripted-diff mostly
06082026/cnodestate copy #36069
pull Crypt-iQ wants to merge 3 commits into bitcoin:master from Crypt-iQ:06082026/cnodestate_copy changing 4 files +39 −35-
Crypt-iQ commented at 5:51 PM on August 24, 2026: contributor
-
29abc167c3
net: move cmpctblocks fields from CNodeState to Peer
Both m_requested_hb_cmpctblocks & m_provides_cmpctblocks were protected by cs_main which is unnecessary. Instead convert them to std::atomic<bool> as Mutex is not needed. This way we don't need to worry about potential lock inversion in the future or thread safety annotations. Also, add a negative annotation to NewPoWValidBlock for m_peer_mutex since it now acquires it.
-
130c115893
net: move fPreferredDownload to Peer, make atomic
Also make the m_num_preferred_download_peers counter atomic and add an assert in FinalizeNode. The asserts for m_num_preferred_download_peers in FinalizeNode are still safe even without cs_main locking because of the implicit guarantee that ProcessMessage may not run for a peer at the same time as FinalizeNode. This has the nice benefit of being able to remove cs_main usage in some places.
-
bfaa8aa01f
scripted-diff: rename fPreferredDownload to m_preferred_download
-BEGIN VERIFY SCRIPT- sed -i "s/fPreferredDownload/m_preferred_download/g" $( git grep -l fPreferredDownload ) -END VERIFY SCRIPT-
- Crypt-iQ closed this on Aug 24, 2026
-
DrahtBot commented at 5:51 PM on August 24, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36069.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process. A summary of reviews will appear here.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
Crypt-iQ commented at 5:52 PM on August 24, 2026: contributor
Woops, wrong repository...