| 528 | } |
| 529 | |
| 530 | void RPCRunLater(const std::string& name, std::function<void()> func, int64_t nSeconds) |
| 531 | { |
| 532 | if (!timerInterface) |
| 533 | throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); |
| 534 | LOCK(g_deadline_timers_mutex); |
| 535 | deadlineTimers.erase(name); |
| 536 | LogPrint(BCLog::RPC, "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); |
| 537 | deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))); |
| 538 | } |
| 539 | |
| 540 | int RPCSerializationFlags() |
| 541 | { |
no test coverage detected