diff --git a/onionr/communicator2.py b/onionr/communicator2.py index df428c03..1c8329da 100755 --- a/onionr/communicator2.py +++ b/onionr/communicator2.py @@ -86,8 +86,8 @@ class OnionrCommunicatorDaemon: OnionrCommunicatorTimers(self, self.daemonCommands, 5) OnionrCommunicatorTimers(self, self.detectAPICrash, 5) peerPoolTimer = OnionrCommunicatorTimers(self, self.getOnlinePeers, 60) - OnionrCommunicatorTimers(self, self.lookupBlocks, 7, requiresPeer=True, maxThreads=1) - OnionrCommunicatorTimers(self, self.getBlocks, 10, requiresPeer=True) + OnionrCommunicatorTimers(self, self.lookupBlocks, self._core.config.get('timers.lookupBlocks'), requiresPeer=True, maxThreads=1) + OnionrCommunicatorTimers(self, self.getBlocks, self._core.config.get('timers.getBlocks'), requiresPeer=True) OnionrCommunicatorTimers(self, self.clearOfflinePeer, 58) OnionrCommunicatorTimers(self, self.daemonTools.cleanOldBlocks, 65) OnionrCommunicatorTimers(self, self.lookupKeys, 60, requiresPeer=True) diff --git a/onionr/static-data/default_config.json b/onionr/static-data/default_config.json index 9fba656b..6e35245e 100644 --- a/onionr/static-data/default_config.json +++ b/onionr/static-data/default_config.json @@ -60,5 +60,9 @@ "minimumScore": -100, "maxStoredPeers": 5000, "maxConnect": 5 + }, + "timers":{ + "lookupBlocks": 25, + "getBlocks": 30 } }