Skip to content

Commit

Permalink
fix reshare script
Browse files Browse the repository at this point in the history
  • Loading branch information
SvineruS committed Feb 26, 2024
1 parent 91f7ffe commit 3d2eda1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions relay/reshare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ MPC_MEID=$2

SIDE_NET_LOWERCASE="${SIDE_NET,,}"
KEYGEN_CONTAINER_NAME="${SIDE_NET_LOWERCASE}-relay-keygen"
SHARE_DIR="share_${SIDE_NET_LOWERCASE}"
SHARE_DIR_HOST="${PWD}/${SHARE_DIR}"
SHARE_DIR_HOST="${PWD}/"share_${SIDE_NET_LOWERCASE}""


if [[ "$SIDE_NET_LOWERCASE" == "eth" ]]; then
Expand All @@ -21,11 +20,11 @@ fi


if [[ "$MPC_MEID" == "Kevin" || "$MPC_MEID" == "Lang" || "$MPC_MEID" == "Rory" ]]; then
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir $SHARE_DIR -meID $MPC_MEID"
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir ./shared -meID $MPC_MEID"
elif [[ "$MPC_MEID" == "backup2" || "$MPC_MEID" == "Michael2" || "$MPC_MEID" == "Seth2" || "$MPC_MEID" == "Od2" ]]; then
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir $SHARE_DIR -meIDNew $MPC_MEID"
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir ./shared -meIDNew $MPC_MEID"
elif [[ "$MPC_MEID" == "Andrey" ]]; then
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir $SHARE_DIR -meID Andrey -meIDNew Andrey2"
CMD="go run ./cmd/mpc_keygen/main.go -reshare -url $URL -partyIDs '$OLD_PARTY' -threshold 5 -partyIDsNew '$NEW_PARTY' -thresholdNew 5 -shareDir ./shared -meID Andrey -meIDNew Andrey2"
else
echo "Error: MPC_MEID value does not match any condition"
exit 1
Expand Down

0 comments on commit 3d2eda1

Please sign in to comment.