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
553
553
CCoinsViewCache& CoinsTip () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
554
554
{
555
555
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 );
558
558
}
559
559
560
560
// ! @returns A reference to the on-disk UTXO set database.
561
561
CCoinsViewDB& CoinsDB () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
562
562
{
563
563
AssertLockHeld (::cs_main);
564
- return m_coins_views->m_dbview ;
564
+ return Assert ( m_coins_views) ->m_dbview ;
565
565
}
566
566
567
567
// ! @returns A pointer to the mempool.
@@ -575,12 +575,15 @@ class Chainstate
575
575
CCoinsViewErrorCatcher& CoinsErrorCatcher () EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
576
576
{
577
577
AssertLockHeld (::cs_main);
578
- return m_coins_views->m_catcherview ;
578
+ return Assert ( m_coins_views) ->m_catcherview ;
579
579
}
580
580
581
581
// ! Destructs all objects related to accessing the UTXO set.
582
582
void ResetCoinsViews () { m_coins_views.reset (); }
583
583
584
+ // ! Does this chainstate have a UTXO set attached?
585
+ bool HasCoinsViews () const { return (bool )m_coins_views; }
586
+
584
587
// ! The cache size of the on-disk coins view.
585
588
size_t m_coinsdb_cache_size_bytes{0 };
586
589
You can’t perform that action at this time.
0 commit comments