init: add missing cs_main lock #24672

pull ajtowns wants to merge 1 commits into bitcoin:master from ajtowns:202203-hiddenlock changing 1 files +1 −1
  1. ajtowns commented at 2:20 pm on March 25, 2022: member
    BlockManager::m_block_tree_db is protected by cs_main, so take the cs_main lock while accessing it.
  2. init: add missing cs_main lock
    BlockManager::m_block_tree_db is protected by cs_main, so take the
    cs_main lock while accessing it.
    0346c26fca
  3. ajtowns commented at 2:22 pm on March 25, 2022: member
    The use of the lambda in Assert and the fact that cs_main is a global lock rather than scoped within a class means that clang’s thread safety checks don’t catch this. cf #24654
  4. jonatack commented at 2:37 pm on March 25, 2022: member
    Code review ACK 0346c26fcacca8abcf67f7320fd441e564aa97d1
  5. MarcoFalke added the label Refactoring on Mar 25, 2022
  6. MarcoFalke commented at 2:47 pm on March 25, 2022: member
    The access is before any other threads are started (import blocks, p2p, rpc, …), so I tagged it with “refactoring”.
  7. MarcoFalke merged this on Mar 25, 2022
  8. MarcoFalke closed this on Mar 25, 2022

  9. sidhujag referenced this in commit a88255d237 on Apr 2, 2022
  10. DrahtBot locked this on Mar 25, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-04 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me