| 144 | } |
| 145 | |
| 146 | void ValidationSignals::SyncWithValidationInterfaceQueue() |
| 147 | { |
| 148 | AssertLockNotHeld(cs_main); |
| 149 | // Block until the validation queue drains |
| 150 | std::promise<void> promise; |
| 151 | CallFunctionInValidationInterfaceQueue([&promise] { |
| 152 | promise.set_value(); |
| 153 | }); |
| 154 | promise.get_future().wait(); |
| 155 | } |
| 156 | |
| 157 | // Use a macro instead of a function for conditional logging to prevent |
| 158 | // evaluating arguments when logging is not enabled. |