@@ -40,11 +40,12 @@ Usage:
4040 -c, --connect-to BOOT_NODE_NAME The name of the boot node to connect to ("alice" | "bob")
4141 -d, --dry-run Flag indicating to only show the resulting command instead of executing it
4242 -t, --telemetry Flag indicating whether or not to send data to the telemetry server
43+ -p, --purge-userdata Purges all chain-dependend user data in auxiliary services (ctypes, contacts, messages, ...)
4344
4445 Examples:
4546
46- Start Alice (boot node):
47- ./start-node.sh -a Alice
47+ Start Alice (boot node) and purge all user data in services components :
48+ ./start-node.sh -a Alice -p
4849
4950 Start Bob (boot node) that connects to Alice:
5051 ./start-node.sh -a Bob -c Alice
@@ -61,6 +62,7 @@ bootnode=
6162node_name=
6263account_name=
6364telemetry=0
65+ purge_userdata=0
6466dry_run=0
6567
6668while [[ " $1 " != " " ]]; do
@@ -76,6 +78,8 @@ while [[ "$1" != "" ]]; do
7678 ;;
7779 -t | --telemetry ) telemetry=1
7880 ;;
81+ -p | --purge-userdata ) purge_userdata=1
82+ ;;
7983 -d | --dry-run ) dry_run=1
8084 ;;
8185 -h | --help ) usage
@@ -129,6 +133,13 @@ if [[ "$telemetry" = "1" ]]; then
129133 arg_telemetry=" --telemetry-url ${TELEMETRY_URL} "
130134fi
131135
136+ if [[ " $purge_userdata " = " 1" ]]; then
137+ echo " Purging user data in services..."
138+ curl -X DELETE http://services.kilt-prototype.tk:3000/ctype
139+ curl -X DELETE http://services.kilt-prototype.tk:3000/messaging
140+ curl -X DELETE http://services.kilt-prototype.tk:3000/contacts
141+ fi
142+
132143command=" ./target/debug/node --chain ${CHAIN_NAME} --validator --port 30333 --ws-port 9944 --ws-external --rpc-external${arg_account_name}${arg_node_key}${arg_boot_node_connect}${arg_node_name}${arg_telemetry} "
133144
134145if [[ " $dry_run " = " 1" ]]; then
0 commit comments