mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Cover UTXO set access with lock annotations
i.e. any CoinsViews members. Adds a lock acquisition to `gettxoutsetinfo` RPC to comply with added annotations. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
This commit is contained in:
@@ -235,8 +235,11 @@ void Shutdown(InitInterfaces& interfaces)
|
||||
//
|
||||
// g_chainstate is referenced here directly (instead of ::ChainstateActive()) because it
|
||||
// may not have been initialized yet.
|
||||
if (g_chainstate && g_chainstate->CanFlushToDisk()) {
|
||||
g_chainstate->ForceFlushStateToDisk();
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (g_chainstate && g_chainstate->CanFlushToDisk()) {
|
||||
g_chainstate->ForceFlushStateToDisk();
|
||||
}
|
||||
}
|
||||
|
||||
// After there are no more peers/RPC left to give us new data which may generate
|
||||
|
||||
Reference in New Issue
Block a user