Skip to content

Instantly share code, notes, and snippets.

View thanhson1085's full-sized avatar

Nguyen Sy Thanh Son thanhson1085

  • Hanoi, Vietnam
View GitHub Profile
#!/bin/sh
# get tomochain container id
container_id=$(docker ps -q -f "name=tomochain")
# remove first peer
echo "\n------------------------\n!! Removing all peers\n------------------------\n"
docker exec -t $container_id tomo attach data/tomo.ipc --exec "for (i = 0; i < admin.peers.length; i++) { admin.removePeer(admin.peers[i].id) }"
# restart node