| 542 | } |
| 543 | |
| 544 | void RPCRunLater(const std::string& name, std::function<void(void)> func, int64_t nSeconds) |
| 545 | { |
| 546 | if (!timerInterface) |
| 547 | throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); |
| 548 | deadlineTimers.erase(name); |
| 549 | LogPrint(BCLog::RPC, "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); |
| 550 | deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))); |
| 551 | } |
| 552 | |
| 553 | int RPCSerializationFlags() |
| 554 | { |
no test coverage detected