Пример #1
0
    def load_node(self, file='node.txt'):
        node_path = os.path.join(self._dataPath, file)
        with open(node_path, 'r') as f:
            text = f.read()
        #print(account)
        self._ip = json.loads(text)["ip"]
        self._port = json.loads(text)["port"]
        self._neighborList = json.loads(text)["neighborList"]

        blockchain = json.loads(text)["blockchain"]
        file_blockchain = Blockchain()
        chain = blockchain["blockchain"]
        file_blockchain._difficulty = blockchain["difficulty"]
        file_blockchain.


        # print(account)
        # print(type(json.loads(account)))
        return