diff --git a/onionr/communicator2.py b/onionr/communicator2.py index e726d46b..eff289ed 100755 --- a/onionr/communicator2.py +++ b/onionr/communicator2.py @@ -197,6 +197,8 @@ class OnionrCommunicatorDaemon: def peerAction(self, peer, action, data=''): '''Perform a get request to a peer''' + if len(peer) == 0: + return False logger.info('Performing ' + action + ' with ' + peer + ' on port ' + str(self.proxyPort)) url = 'http://' + peer + '/public/?action=' + action if len(data) > 0: diff --git a/onionr/onionrblockapi.py b/onionr/onionrblockapi.py index 13a195c8..4e46e5a4 100644 --- a/onionr/onionrblockapi.py +++ b/onionr/onionrblockapi.py @@ -168,7 +168,7 @@ class Block: blockFile.write(self.getRaw().encode()) self.update() else: - self.hash = self.getCore().insertBlock(self.getContent(), header = self.getType(), sign = sign, metadata = self.getMetadata()) + self.hash = self.getCore().insertBlock(self.getContent(), header = self.getType(), sign = sign) self.update() return self.getHash() else: