message: Add missing thread safety lock assertions in validation.h
diff: @@ -527,7 +527,9 @@ public:
  //! @returns whether or not the CoinsViews object has been fully initialized and we can
  //! safely flush this object to disk.
  - bool CanFlushToDisk() const EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
  + bool CanFlushToDisk() const EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
  + {
  + AssertLockHeld(::cs_main);
  return m_coins_views && m_coins_views->m_cacheview;
  }
  @@ -555,15 +557,17 @@ public:
  std::set<CBlockIndex*, node::CBlockIndexWorkComparator> setBlockIndexCandidates;
  //! @returns A reference to the in-memory cache of the UTXO set.
  - CCoinsViewCache& CoinsTip() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
  + CCoinsViewCache& CoinsTip() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
  {
  + AssertLockHeld(::cs_main);
  assert(m_coins_views->m_cacheview);
  return *m_coins_views->m_cacheview.get();
  }
  //! @returns A reference to the on-disk UTXO set database.
  - CCoinsViewDB& CoinsDB() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
  + CCoinsViewDB& CoinsDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
  {
  + AssertLockHeld(::cs_main);
  return m_coins_views->m_dbview;
  }
  @@ -575,8 +579,9 @@ public:
  //! @returns A reference to a wrapped view of the in-memory UTXO set that
  //! handles disk read errors gracefully.
  - CCoinsViewErrorCatcher& CoinsErrorCatcher() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
  + CCoinsViewErrorCatcher& CoinsErrorCatcher() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
  {
  + AssertLockHeld(::cs_main);
  return m_coins_views->m_catcherview;
  }
  @@ -922,6 +927,7 @@ public:
  node::BlockMap& BlockIndex() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
  {
  + AssertLockHeld(::cs_main);
  return m_blockman.m_block_index;
  }
  