From 3da06339f6c51dcbca6262d2230d4221d6816b91 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 26 Oct 2018 18:11:18 -0500 Subject: [PATCH] removed key sync --- onionr/communicator2.py | 17 ----------------- onionr/onionrcrypto.py | 1 - 2 files changed, 18 deletions(-) diff --git a/onionr/communicator2.py b/onionr/communicator2.py index c3a104f2..19b4db31 100755 --- a/onionr/communicator2.py +++ b/onionr/communicator2.py @@ -94,7 +94,6 @@ class OnionrCommunicatorDaemon: 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) OnionrCommunicatorTimers(self, self.lookupAdders, 60, requiresPeer=True) OnionrCommunicatorTimers(self, self.daemonTools.cooldownPeer, 30, requiresPeer=True) netCheckTimer = OnionrCommunicatorTimers(self, self.daemonTools.netCheck, 600) @@ -130,18 +129,6 @@ class OnionrCommunicatorDaemon: self._core._utils.localCommand('shutdown') # shutdown the api time.sleep(0.5) - def lookupKeys(self): - '''Lookup new keys''' - logger.debug('Looking up new keys...') - tryAmount = 1 - for i in range(tryAmount): # amount of times to ask peers for new keys - # Download new key list from random online peers - peer = self.pickOnlinePeer() - newKeys = self.peerAction(peer, action='kex') - self._core._utils.mergeKeys(newKeys) - self.decrementThreadCount('lookupKeys') - return - def lookupAdders(self): '''Lookup new peer addresses''' logger.info('LOOKING UP NEW ADDRESSES') @@ -465,10 +452,6 @@ class OnionrCommunicatorDaemon: open(self._core.dataDir + '.runcheck', 'w+').close() elif cmd[0] == 'connectedPeers': self.printOnlinePeers() - elif cmd[0] == 'kex': - for i in self.timers: - if i.timerFunction.__name__ == 'lookupKeys': - i.count = (i.frequency - 1) elif cmd[0] == 'pex': for i in self.timers: if i.timerFunction.__name__ == 'lookupAdders': diff --git a/onionr/onionrcrypto.py b/onionr/onionrcrypto.py index 7b66a7d9..678a4457 100644 --- a/onionr/onionrcrypto.py +++ b/onionr/onionrcrypto.py @@ -159,7 +159,6 @@ class OnionrCrypto: anonBox = nacl.public.SealedBox(privkey) else: anonBox = nacl.public.SealedBox(ownKey) - print(data) decrypted = anonBox.decrypt(data, encoder=encoding) return decrypted