Skip to content

Commit

Permalink
Merged in network-config-add-ip-comment (pull request #1100)
Browse files Browse the repository at this point in the history
Add current node ip annotation to the configuration file

Approved-by: zhangyaning <[email protected]>
  • Loading branch information
driftluo authored and zhangyaning committed Jul 16, 2018
2 parents aed3d66 + 567341c commit 1b89463
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/create_cita_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def append_node(self, node):
network_data['peers'].append(
dict(id_card=node_id, ip=node['host'], port=node['port']))
with open(network_config, 'wt') as stream:
stream.write(f"# Current node ip is {node['host']}\n")
toml.dump(network_data, stream)

network_config = os.path.join(node_dir, 'network.toml')
Expand All @@ -292,6 +293,7 @@ def append_node(self, node):
network_data['id_card'] = node_id
network_data['port'] = node['port']
with open(network_config, 'wt') as stream:
stream.write(f"# Current node ip is {node['host']}\n")
toml.dump(network_data, stream)

with open(self.nodes_list, 'at') as stream:
Expand Down

0 comments on commit 1b89463

Please sign in to comment.