Skip to content

Commit

Permalink
added peer for statesync testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic authored Jan 25, 2022
1 parent c88b977 commit d235a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osmosis-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ def testnetStateSyncInit ():
TRUST_HEIGHT= str(int(LATEST_HEIGHT.stdout.strip()) - 1000)
TRUST_HASH= subprocess.run(["curl -s \"http://51.15.246.145:26657/block?height="+str(TRUST_HEIGHT)+"\" | jq -r .result.block_id.hash"], capture_output=True, shell=True, text=True)
RPCs = "51.15.246.145:26657,51.15.246.145:26657"
peers = "[email protected]:26656"
subprocess.run(["sed -i.bak -E 's/enable = false/enable = true/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
subprocess.run(["sed -i.bak -E 's/rpc_servers = \"\"/rpc_servers = \""+RPCs+"\"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
subprocess.run(["sed -i.bak -E 's/trust_height = 0/trust_height = "+TRUST_HEIGHT+"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
subprocess.run(["sed -i.bak -E 's/trust_hash = \"\"/trust_hash = \""+TRUST_HASH.stdout.strip()+"\"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
subprocess.run(["sed -i.bak -E 's/persistent_peers = \"\"/persistent_peers = \""+peers+"\"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
if os_name == "Linux":
subprocess.run(["clear"], shell=True)
cosmovisorInit()
Expand Down Expand Up @@ -337,6 +335,8 @@ def setupTestnet ():
subprocess.run(["wget -O "+ HOME.stdout.strip()+"/.osmosisd/config/genesis.tar.bz2 https://github.com/osmosis-labs/networks/raw/unity/v4/osmosis-1/upgrades/v4/testnet/genesis.tar.bz2"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
#subprocess.run(["curl -OL https://github.com/osmosis-labs/networks/raw/unity/v4/osmosis-1/upgrades/v4/testnet/genesis.tar.bz2"], shell=True)
print(bcolors.OKGREEN + "Finding and Replacing Seeds..." + bcolors.ENDC)
peers = "[email protected]:26656"
subprocess.run(["sed -i.bak -E 's/persistent_peers = \"\"/persistent_peers = \""+peers+"\"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
subprocess.run(["tar -xjf "+ HOME.stdout.strip()+"/.osmosisd/config/genesis.tar.bz2"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
subprocess.run(["rm "+ HOME.stdout.strip()+"/.osmosisd/config/genesis.tar.bz2"], shell=True)
subprocess.run(["sed -i.bak -E 's/seeds = \"[email protected]:2000,[email protected]:26656\"/seeds = \"[email protected]:26656\"/g' "+HOME.stdout.strip()+"/.osmosisd/config/config.toml"], shell=True)
Expand Down

0 comments on commit d235a1d

Please sign in to comment.