diff --git a/tests/cases/tm2tm/scripts/test-channel-upgrade b/tests/cases/tm2tm/scripts/test-channel-upgrade index ed3a9cae..5eed5aaf 100755 --- a/tests/cases/tm2tm/scripts/test-channel-upgrade +++ b/tests/cases/tm2tm/scripts/test-channel-upgrade @@ -26,20 +26,20 @@ $RLY paths edit $PATH_NAME dst connection-id '' # create a new connection and save the new connection identifiers retry 5 $RLY tx connection $PATH_NAME -srcConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].src."connection-id"') -dstConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].dst."connection-id"') +srcAltConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].src."connection-id"') +dstAltConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].dst."connection-id"') # resume the original config.json mv $origconfig "$RELAYER_CONF/config/config.json" # test channel upgrade (crossing-hello) -$RLY tx channel-upgrade init ibc01 ibc0 --ordering ORDER_UNORDERED --connection-hops $srcConnectionId --version ics20-1 -$RLY tx channel-upgrade init ibc01 ibc1 --ordering ORDER_UNORDERED --connection-hops $dstConnectionId --version ics20-1 +$RLY tx channel-upgrade init ibc01 ibc0 --ordering ORDER_UNORDERED --connection-hops $srcAltConnectionId --version ics20-1 +$RLY tx channel-upgrade init ibc01 ibc1 --ordering ORDER_UNORDERED --connection-hops $dstAltConnectionId --version ics20-1 $RLY tx channel-upgrade execute ibc01 pathSrcConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].src."connection-id"') pathDstConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].dst."connection-id"') -[ "$pathSrcConnectionId" = "$srcConnectionId" ] || { echo 'src path config update failed'; exit 1; } -[ "$pathDstConnectionId" = "$dstConnectionId" ] || { echo 'dst path config update failed'; exit 1; } +[ "$pathSrcConnectionId" = "$srcAltConnectionId" ] || { echo 'src path config update failed'; exit 1; } +[ "$pathDstConnectionId" = "$dstAltConnectionId" ] || { echo 'dst path config update failed'; exit 1; } # test channel upgrade (non-crossing-hello) $RLY tx channel-upgrade init ibc01 ibc0 --ordering ORDER_UNORDERED --connection-hops $srcOrigConnectionId --version ics20-1 @@ -52,8 +52,8 @@ pathDstConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name " [ "$pathDstConnectionId" = "$dstOrigConnectionId" ] || { echo 'dst path config update failed'; exit 1; } # test channel upgrade cancel -$RLY tx channel-upgrade init ibc01 ibc0 --ordering ORDER_UNORDERED --connection-hops $srcConnectionId --version ics20-1 -$RLY tx channel-upgrade init ibc01 ibc1 --ordering ORDER_UNORDERED --connection-hops $dstConnectionId --version ics20-1 +$RLY tx channel-upgrade init ibc01 ibc0 --ordering ORDER_UNORDERED --connection-hops $srcAltConnectionId --version ics20-1 +$RLY tx channel-upgrade init ibc01 ibc1 --ordering ORDER_UNORDERED --connection-hops $dstAltConnectionId --version ics20-1 $RLY tx channel-upgrade cancel ibc01 ibc0 # create situation where ibc0.error_receipt.sequence >= ibc1.channel.upgrade_sequence $RLY tx channel-upgrade execute ibc01 # the channel upgrade of ibc1 should be cancelled pathSrcConnectionId=$($RLY paths list --json | jq --raw-output --arg path_name "$PATH_NAME" '.[$path_name].src."connection-id"')