Implement RPCTimerHandler for Qt RPC console

Implement RPCTimerHandler for Qt RPC console, so that `walletpassphrase`
works with GUI and `-server=0`.

Also simplify HTTPEvent-related code by using boost::function directly.
This commit is contained in:
Wladimir J. van der Laan
2015-08-28 16:46:20 +02:00
parent 57d85d9bee
commit be33f3f50b
7 changed files with 67 additions and 50 deletions

View File

@@ -562,7 +562,7 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
deadlineTimers.erase(name);
RPCTimerInterface* timerInterface = timerInterfaces[0];
LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name());
deadlineTimers.insert(std::make_pair(name, timerInterface->NewTimer(func, nSeconds)));
deadlineTimers.insert(std::make_pair(name, timerInterface->NewTimer(func, nSeconds*1000)));
}
const CRPCTable tableRPC;