mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02: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:
parent
5693530685
commit
582d2cd747
4 changed files with 22 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue