Skip to content

Commit bc5b508

Browse files
authored
Update node.sh
1 parent 2896eda commit bc5b508

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

build/skeleton/node.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5263,6 +5263,46 @@ arbiter_modify_configfile()
52635263
echo_ok "arbiter add PG config completedly"
52645264
}
52655265

5266+
arbiter_remove_sidechain_config()
5267+
{
5268+
5269+
local ARBITER_CONFIG=${SCRIPT_PATH}/arbiter/config.json
5270+
local ARBITER_PGP_CONFIG=${SCRIPT_PATH}/arbiter/pgp_config.json
5271+
5272+
if [ ! -f $ARBITER_CONFIG ]; then
5273+
echo_error "$ARBITER_CONFIG not exists"
5274+
return
5275+
fi
5276+
5277+
if ! grep -qi "20662" "$ARBITER_CONFIG"; then
5278+
echo "config file have not PGP sidechain configuration"
5279+
return
5280+
fi
5281+
5282+
echo "stop arbiter node"
5283+
5284+
local PID=$(pgrep -x arbiter)
5285+
if [ $PID ]; then
5286+
arbiter_stop
5287+
fi
5288+
5289+
echo "backup arbiter config file..."
5290+
cp -v ${SCRIPT_PATH}/arbiter/config.json ${SCRIPT_PATH}/arbiter/config_backup_remove_pgp_before_2025_11_11.json
5291+
5292+
echo "modify arbiter config file..."
5293+
5294+
if [ "$CHAIN_TYPE" == "testnet" ]; then
5295+
echo "testnet do nothing"
5296+
else
5297+
echo "Remove mainnet pgp config"
5298+
jq 'del(.Configuration.SideNodeList[] | select(.Name == "PGP"))' $ARBITER_CONFIG > $ARBITER_PGP_CONFIG && mv $ARBITER_PGP_CONFIG ${SCRIPT_PATH}/arbiter/config.json
5299+
fi
5300+
5301+
echo_ok "arbiter Remove PGP config completedly"
5302+
}
5303+
5304+
5305+
52665306
arbiter_init()
52675307
{
52685308
if [ ! -f $SCRIPT_PATH/ela/.init ]; then
@@ -5662,6 +5702,7 @@ else
56625702
[ "$2" == "transfer" ] || \
56635703
[ "$2" == "compress_log" ] || \
56645704
[ "$2" == "modify_configfile" ] || \
5705+
[ "$2" == "remove_sidechain_config" ] || \
56655706
[ "$2" == "remove_log" ]; then
56665707
COMMAND=$2
56675708
else

0 commit comments

Comments
 (0)