diff --git a/onionr/apiservers/private/__init__.py b/onionr/apiservers/private/__init__.py index b413ac91..d6e63537 100644 --- a/onionr/apiservers/private/__init__.py +++ b/onionr/apiservers/private/__init__.py @@ -92,4 +92,4 @@ class PrivateAPI: pass def getBlockData(self, bHash, decrypt=False, raw=False, headerOnly=False): - return self.get_block_data.get_block_data(bHash, decrypt=decrypt, raw=raw, headerOnly=headerOnly) \ No newline at end of file + return self.get_block_data.get_block_data(bHash, decrypt=decrypt, raw=raw, headerOnly=headerOnly) diff --git a/onionr/coredb/daemonqueue/__init__.py b/onionr/coredb/daemonqueue/__init__.py index d2e058a8..67e05975 100644 --- a/onionr/coredb/daemonqueue/__init__.py +++ b/onionr/coredb/daemonqueue/__init__.py @@ -22,7 +22,7 @@ import sqlite3, os from onionrplugins import onionrevents as events from onionrutils import localcommand, epoch from .. import dbfiles -import dbcreator +from onionrsetup import dbcreator def daemon_queue()->str: ''' diff --git a/onionr/dbcreator.py b/onionr/onionrsetup/dbcreator.py similarity index 100% rename from onionr/dbcreator.py rename to onionr/onionrsetup/dbcreator.py diff --git a/onionr/onionrstorage/__init__.py b/onionr/onionrstorage/__init__.py index 7b722630..bad34447 100755 --- a/onionr/onionrstorage/__init__.py +++ b/onionr/onionrstorage/__init__.py @@ -20,7 +20,8 @@ import sys, sqlite3, os from onionrutils import bytesconverter, stringvalidators from coredb import dbfiles -import filepaths, onionrcrypto, dbcreator, onionrexceptions +import filepaths, onionrcrypto, onionrexceptions +from onionrsetup import dbcreator from onionrcrypto import hashers from . import setdata DB_ENTRY_SIZE_LIMIT = 10000 # Will be a config option diff --git a/onionr/onionrutils/mnemonickeys.py b/onionr/onionrutils/mnemonickeys.py index 55484761..54032b8a 100644 --- a/onionr/onionrutils/mnemonickeys.py +++ b/onionr/onionrutils/mnemonickeys.py @@ -35,8 +35,8 @@ def get_human_readable_ID(pub=''): if not len(pub) == onionrvalues.MAIN_PUBLIC_KEY_SIZE: pub = base64.b32decode(pub) - return m.to_mnemonic(pub) + return m.to_mnemonic(pub).replace(' ', '-') def get_base32(words): '''converts mnemonic to base32''' - return unpaddedbase32.b32encode(m.to_entropy(words)) + return unpaddedbase32.b32encode(m.to_entropy(words.replace('-', ' '))) diff --git a/onionr/utils/createdirs.py b/onionr/utils/createdirs.py index 054f04b5..fb61e88c 100644 --- a/onionr/utils/createdirs.py +++ b/onionr/utils/createdirs.py @@ -19,7 +19,8 @@ ''' import os from . import identifyhome -import dbcreator, filepaths +from onionrsetup import dbcreator +import filepaths home = identifyhome.identify_home() def create_dirs(): diff --git a/tests/test_highlevelcrypto.py b/tests/test_highlevelcrypto.py index 962ba2ce..79ddf42f 100755 --- a/tests/test_highlevelcrypto.py +++ b/tests/test_highlevelcrypto.py @@ -51,7 +51,7 @@ class OnionrCryptoTests(unittest.TestCase): def test_human_readable_length(self): human = mnemonickeys.get_human_readable_ID() - self.assertTrue(len(human.split(' ')) == 24) + self.assertTrue(len(human.split('-')) == 24) def test_safe_compare(self): self.assertTrue(crypto.cryptoutils.safe_compare('test', 'test'))