@@ -48,14 +48,14 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
4848 __network=" --genesis-file=/var/lib/besu/testnet/${config_dir} /besu.json --bootnodes=${bootnodes} \
4949--Xfilter-on-enr-fork-id=true --rpc-http-api=ADMIN,CLIQUE,MINER,ETH,NET,DEBUG,TXPOOL,ENGINE,TRACE,WEB3"
5050else
51- __network=" --network ${NETWORK} --rpc-http-api WEB3,ETH,NET "
51+ __network=" --network ${NETWORK} "
5252fi
5353
5454if [ " ${ARCHIVE_NODE} " = " true" ]; then
5555 echo " Besu archive node without pruning"
5656 __prune=" --data-storage-format=FOREST --sync-mode=FULL"
5757else
58- __prune=" --data-storage-format=BONSAI --sync-mode=SNAP "
58+ __prune=" "
5959fi
6060
6161__memtotal=$( awk ' /MemTotal/ {printf "%d", int($2/1024/1024)}' /proc/meminfo)
6565 __spec=" "
6666fi
6767
68+ # New or old datadir
69+ if [ -d /var/lib/besu-og/database ]; then
70+ __datadir=" --data-path /var/lib/besu-og"
71+ else
72+ __datadir=" --data-path /var/lib/besu"
73+ fi
74+
75+ # DiscV5 for IPV6
76+ if [ " ${IPV6:- false} " = " true" ]; then
77+ echo " Configuring Besu for discv5 for IPv6 advertisements"
78+ __ipv6=" --Xv5-discovery-enabled"
79+ else
80+ __ipv6=" "
81+ fi
82+
6883if [ -f /var/lib/besu/prune-marker ]; then
6984 rm -f /var/lib/besu/prune-marker
7085 if [ " ${ARCHIVE_NODE} " = " true" ]; then
@@ -73,9 +88,9 @@ if [ -f /var/lib/besu/prune-marker ]; then
7388 fi
7489# Word splitting is desired for the command line parameters
7590# shellcheck disable=SC2086
76- exec " $@ " ${__network} ${__prune} ${EL_EXTRAS} storage trie-log prune
91+ exec " $@ " ${__datadir} ${ __network} ${__prune} ${EL_EXTRAS} storage trie-log prune
7792else
7893# Word splitting is desired for the command line parameters
7994# shellcheck disable=SC2086
80- exec " $@ " ${__network} ${__prune} ${__spec} ${EL_EXTRAS}
95+ exec " $@ " ${__datadir} ${ __network} ${__ipv6 } ${__prune} ${__spec} ${EL_EXTRAS}
8196fi
0 commit comments