make blacklist configurable

This commit is contained in:
Sebastian
2024-03-19 05:59:24 +01:00
parent fa64d26843
commit bbb3cd28b3
2 changed files with 15 additions and 1 deletions

8
path-blacklist.txt Normal file
View File

@@ -0,0 +1,8 @@
lighthouse
prism
beacon
nimbus
ws
arbitrum-classic
hagall
public

View File

@@ -2,7 +2,13 @@
BASEPATH=/root/rpc BASEPATH=/root/rpc
source $BASEPATH/.env source $BASEPATH/.env
blacklist=("lighthouse" "prism" "beacon" "nimbus" "ws" "arbitrum-classic" "hagall" "public")
blacklist=()
while IFS= read -r line; do
# Add each line to the array
blacklist+=("$line")
done < "path-blacklist.txt"
pathlist=$(cat $BASEPATH/$1.yml | grep -oP "(?<=stripprefix\.prefixes).*\"" | cut -d'=' -f2- | sed 's/.$//') pathlist=$(cat $BASEPATH/$1.yml | grep -oP "(?<=stripprefix\.prefixes).*\"" | cut -d'=' -f2- | sed 's/.$//')
for path in $pathlist; do for path in $pathlist; do