parent
416cef7a2b
commit
1748662dfb
@ -1,19 +1,21 @@ |
||||
from collections import namedtuple |
||||
import requests |
||||
amazon_ipv4_url = "http://169.254.169.254/latest/meta-data/public-ipv4" |
||||
if __name__ == "__main__": |
||||
current_ip = requests.get(amazon_ipv4_url).text |
||||
f = open("all_peerlist.txt",r) |
||||
f = open("global_nodes.txt",r) |
||||
for myline in f: |
||||
mylist = myline.strip().split(" ") |
||||
mylist = myline.split(" ") |
||||
ip = mylist[0] |
||||
if ip != current_ip: |
||||
node = mylist[2] |
||||
if ip != current_ip or node != "transaction": |
||||
peerList.append(myline) |
||||
else: |
||||
h = open("isTransaction.txt",w) |
||||
h.write("I am just a transaction generator node") |
||||
h.close() |
||||
f.close() |
||||
g = open("global_peerlist.txt") |
||||
g = open("global_peerlist.txt",w) |
||||
for myline peerList: |
||||
g.write(myline + "\n") |
||||
g.close() |
||||
|
||||
|
||||
g.write(myline) |
||||
g.close() |
||||
|
@ -1,3 +1,3 @@ |
||||
#!/bin/bash -x |
||||
cd /home/ec2-user/projects/src/harmony-benchmark |
||||
./deploy_linux.sh local_config2.txt |
||||
./deploy_one_instance.sh global_peerlist.txt |
Loading…
Reference in new issue