| 2642 | explicit CoinsViewScanReserver() : m_could_reserve(false) {} |
| 2643 | |
| 2644 | bool reserve() { |
| 2645 | CHECK_NONFATAL(!m_could_reserve); |
| 2646 | if (g_scan_in_progress.exchange(true)) { |
| 2647 | return false; |
| 2648 | } |
| 2649 | CHECK_NONFATAL(g_scan_progress == 0); |
| 2650 | m_could_reserve = true; |
| 2651 | return true; |
| 2652 | } |
| 2653 | |
| 2654 | ~CoinsViewScanReserver() { |
| 2655 | if (m_could_reserve) { |
no outgoing calls
no test coverage detected