wallet: Add missing cs_wallet locks when accessing m_last_block_processed #11754

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:missing-m_last_block_processed-locks changing 2 files +6 −8
  1. practicalswift commented at 8:50 pm on November 22, 2017: contributor

    Add missing cs_wallet locks when accessing m_last_block_processed.

    m_last_block_processed is guarded by cs_wallet.

    These changes are required to get the Travis CI build (the build job with Clang’s thread safety analysis enabled) to pass when the following locking annotation (see #11226) is added:

    0const CBlockIndex* m_last_block_processed GUARDED_BY(cs_wallet);
    
  2. MarcoFalke commented at 8:55 pm on November 22, 2017: member
    Since this helps review, might as well add the GUARDED_BY annotation to prevent further patches that touch the same line.
  3. practicalswift force-pushed on Nov 22, 2017
  4. practicalswift commented at 8:58 pm on November 22, 2017: contributor
    @MarcoFalke Good idea! Fixed and pushed :-)
  5. Add missing cs_wallet locks when accessing m_last_block_processed
    m_last_block_processed is guarded by cs_wallet.
    
    These changes are required to get the Travis CI build (the build
    job with Clang's thread safety analysis enabled) to pass when the
    following locking annotation is added:
    
    ```
    const CBlockIndex* m_last_block_processed GUARDED_BY(cs_wallet);
    ```
    e7371008ea
  6. practicalswift force-pushed on Nov 22, 2017
  7. practicalswift renamed this:
    Add missing cs_wallet locks when accessing m_last_block_processed
    wallet: Add missing cs_wallet locks when accessing m_last_block_processed
    on Nov 22, 2017
  8. promag commented at 9:12 pm on November 22, 2017: member
    utACK e737100. Looks good!
  9. fanquake added the label Wallet on Nov 22, 2017
  10. promag commented at 3:09 pm on February 3, 2018: member
    Sorry @practicalswift, it’s a NACK. At the moment m_last_block_processed is guarded by cs_main. See https://github.com/bitcoin/bitcoin/blob/85123be78df5a4e9447e70f9ee727416d45843d7/src/wallet/wallet.cpp#L1280-L1282
  11. practicalswift closed this on Feb 4, 2018

  12. practicalswift deleted the branch on Apr 10, 2021
  13. DrahtBot locked this on Aug 16, 2022

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-10-04 22:12 UTC

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