| 158 | } |
| 159 | |
| 160 | void SyncWithValidationInterfaceQueue() |
| 161 | { |
| 162 | AssertLockNotHeld(cs_main); |
| 163 | // Block until the validation queue drains |
| 164 | std::promise<void> promise; |
| 165 | CallFunctionInValidationInterfaceQueue([&promise] { |
| 166 | promise.set_value(); |
| 167 | }); |
| 168 | promise.get_future().wait(); |
| 169 | } |
| 170 | |
| 171 | // Use a macro instead of a function for conditional logging to prevent |
| 172 | // evaluating arguments when logging is not enabled. |