| 169 | } |
| 170 | |
| 171 | void SyncWithValidationInterfaceQueue() { |
| 172 | AssertLockNotHeld(cs_main); |
| 173 | // Block until the validation queue drains |
| 174 | std::promise<void> promise; |
| 175 | CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); |
| 176 | promise.get_future().wait(); |
| 177 | } |
| 178 | |
| 179 | // Use a macro instead of a function for conditional logging to prevent |
| 180 | // evaluating arguments when logging is not enabled. |