diff --git a/CHANGELOG.md b/CHANGELOG.md index 93fe25102f..2a44e3860d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * Update ibcnet ports so they don't conflict with host machine. [#1622](https://github.com/provenance-io/provenance/issues/1622) +### Bug Fixes + +* Fix ibcnet relayer creating multiple connections on restart [#1620](https://github.com/provenance-io/provenance/issues/1620). + --- ## [v1.16.0](https://github.com/provenance-io/provenance/releases/tag/v1.16.0) - 2023-06-23 diff --git a/networks/ibc/blockchain-relayer/entrypoint.sh b/networks/ibc/blockchain-relayer/entrypoint.sh index 5b00773871..09a688fa69 100755 --- a/networks/ibc/blockchain-relayer/entrypoint.sh +++ b/networks/ibc/blockchain-relayer/entrypoint.sh @@ -7,8 +7,13 @@ export RELAYER_HOME="/relayer" export RELAY_PATH="local_local2" -# Setup the connection, client, and channel -rly tx link "$RELAY_PATH" --home "$RELAYER_HOME" +# Setup the connection, client, and channel on first run +PATH_COUNT=$(rly --home "$RELAYER_HOME" q connections local | wc -l) +if [[ "$PATH_COUNT" -eq 0 ]];then + echo "Initializing the relayer" + rly tx link "$RELAY_PATH" --home "$RELAYER_HOME" +fi # Start the relayer +echo "Starting the relayer" rly start "$RELAY_PATH" -p events --home "$RELAYER_HOME" \ No newline at end of file