test1.py 350 B

12345678910111213141516171819
  1. from node import Node
  2. def create_node(meta):
  3. node = Node(meta)
  4. node.run()
  5. if __name__ == "__main__":
  6. ip = "localhost"
  7. node_meta = {
  8. "id": '0',
  9. "addr": ("localhost", 10000),
  10. "peers": {
  11. '1': ("localhost", 10001),
  12. '2': ("localhost", 10002),
  13. },
  14. }
  15. create_node(node_meta)