Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Update generate-membership.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkolegov authored Jul 11, 2023
1 parent 8907c64 commit 6a09515
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions deployment/scripts/generate-membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Input is read from stdin and output written to stdout.
# Configuration number of the membership is always set to 0.
#
# Weight must be greater than 0.
#
# Example input:
# t1dgw4345grpw53zdhu75dc6jj4qhrh4zoyrtq6di@/ip4/172.31.39.78/tcp/43077/p2p/12D3KooWNzTunrQtcoo4SLWNdQ4EdFWSZtah6mgU44Q5XWM61aan
# t1a5gxsoogaofa5nzfdh66l6uynx4m6m4fiqvcx6y@/ip4/172.31.33.169/tcp/38257/p2p/12D3KooWABvxn3CHjz9r5TYGXGDqm8549VEuAyFpbkH8xWkNLSmr
Expand All @@ -19,22 +21,22 @@
# {
# "addr": "t1dgw4345grpw53zdhu75dc6jj4qhrh4zoyrtq6di",
# "net_addr": "/ip4/172.31.39.78/tcp/43077/p2p/12D3KooWNzTunrQtcoo4SLWNdQ4EdFWSZtah6mgU44Q5XWM61aan",
# "weight": "0"
# "weight": "1"
# },
# {
# "addr": "t1a5gxsoogaofa5nzfdh66l6uynx4m6m4fiqvcx6y",
# "net_addr": "/ip4/172.31.33.169/tcp/38257/p2p/12D3KooWABvxn3CHjz9r5TYGXGDqm8549VEuAyFpbkH8xWkNLSmr",
# "weight": "0"
# "weight": "1"
# },
# {
# "addr": "t1q4j6esoqvfckm7zgqfjynuytjanbhirnbwfrsty",
# "net_addr": "/ip4/172.31.42.15/tcp/44407/p2p/12D3KooWGdQGu1utYP6KD1Cq4iXTLV6hbZa8yQN34zwuHNP5YbCi",
# "weight": "0"
# "weight": "1"
# },
# {
# "addr": "t16biatgyushsfcidabfy2lm5wo22ppe6r7ddir6y",
# "net_addr": "/ip4/172.31.47.117/tcp/34355/p2p/12D3KooWEtfTyoWW7pFLsErAb6jPiQQCC3y3junHtLn9jYnFHei8",
# "weight": "0"
# "weight": "1"
# }
# ]
# }
Expand All @@ -52,7 +54,7 @@ def parse_validator(line: str):
membership["validators"].append({
"addr": tokens[0],
"net_addr": tokens[1],
"weight": "0",
"weight": "1",
})

for line in sys.stdin.readlines():
Expand Down

0 comments on commit 6a09515

Please sign in to comment.