diff --git a/bigchaindb/utils.py b/bigchaindb/utils.py index 1ef8a9c5..ba781214 100644 --- a/bigchaindb/utils.py +++ b/bigchaindb/utils.py @@ -2,9 +2,13 @@ import contextlib import threading import queue import multiprocessing as mp +import json import setproctitle +from bigchaindb.tendermint_utils import key_from_base64 +from bigchaindb.common.crypto import key_pair_from_ed25519_key + class ProcessGroup(object): @@ -31,7 +35,8 @@ class ProcessGroup(object): class Process(mp.Process): """Wrapper around multiprocessing.Process that uses setproctitle to set the name of the process when running - the target task.""" + the target task. + """ def run(self): setproctitle.setproctitle(self.name) @@ -171,9 +176,6 @@ class Lazy: # Load Tendermint's public and private key from the file path def load_node_key(path): - import json - from bigchaindb.tendermint_utils import key_from_base64 - from bigchaindb.common.crypto import key_pair_from_ed25519_key with open(path) as json_data: priv_validator = json.load(json_data) priv_key = priv_validator['priv_key']['value']