Skip to content

Commit

Permalink
added persistent peer for statesync
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic authored Jan 25, 2022
1 parent d172a19 commit c88b977
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions osmosis-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ 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

0 comments on commit c88b977

Please sign in to comment.