File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -553,15 +553,15 @@ class Chainstate
553553 CCoinsViewCache& CoinsTip () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
554554 {
555555 AssertLockHeld (::cs_main);
556- assert (m_coins_views-> m_cacheview );
557- return *m_coins_views->m_cacheview . get ( );
556+ Assert (m_coins_views);
557+ return *Assert ( m_coins_views->m_cacheview );
558558 }
559559
560560 // ! @returns A reference to the on-disk UTXO set database.
561561 CCoinsViewDB& CoinsDB () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
562562 {
563563 AssertLockHeld (::cs_main);
564- return m_coins_views->m_dbview ;
564+ return Assert ( m_coins_views) ->m_dbview ;
565565 }
566566
567567 // ! @returns A pointer to the mempool.
@@ -575,12 +575,15 @@ class Chainstate
575575 CCoinsViewErrorCatcher& CoinsErrorCatcher () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
576576 {
577577 AssertLockHeld (::cs_main);
578- return m_coins_views->m_catcherview ;
578+ return Assert ( m_coins_views) ->m_catcherview ;
579579 }
580580
581581 // ! Destructs all objects related to accessing the UTXO set.
582582 void ResetCoinsViews () { m_coins_views.reset (); }
583583
584+ // ! Does this chainstate have a UTXO set attached?
585+ bool HasCoinsViews () const { return (bool )m_coins_views; }
586+
584587 // ! The cache size of the on-disk coins view.
585588 size_t m_coinsdb_cache_size_bytes{0 };
586589
You can’t perform that action at this time.
0 commit comments