| 2269 | explicit CoinsViewScanReserver() = default; |
| 2270 | |
| 2271 | bool reserve() { |
| 2272 | CHECK_NONFATAL(!m_could_reserve); |
| 2273 | if (g_scan_in_progress.exchange(true)) { |
| 2274 | return false; |
| 2275 | } |
| 2276 | CHECK_NONFATAL(g_scan_progress == 0); |
| 2277 | m_could_reserve = true; |
| 2278 | return true; |
| 2279 | } |
| 2280 | |
| 2281 | ~CoinsViewScanReserver() { |
| 2282 | if (m_could_reserve) { |
no outgoing calls
no test coverage detected