From 0e1e3d67e13a63c667c425e3f8d19a442fa8884b Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Fri, 11 Aug 2023 12:18:27 +0530 Subject: [PATCH] Export Lotus miner node multiaddr after initialization --- app/data/config/fixturenet-lotus/setup-miner.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/data/config/fixturenet-lotus/setup-miner.sh b/app/data/config/fixturenet-lotus/setup-miner.sh index de1cc4c2..2e9efb0a 100644 --- a/app/data/config/fixturenet-lotus/setup-miner.sh +++ b/app/data/config/fixturenet-lotus/setup-miner.sh @@ -33,8 +33,8 @@ while ! grep -q "started ChainNotify channel" /var/log/lotus.log ; do done echo "Daemon started." -# publish bootnode peer info to shared volume -lotus net listen | grep "$(ip addr | grep inet | grep -v '127.0.0.1' | sort | head -1 | awk '{print $2}' | cut -d '/' -f1)" | head -1 > /root/.lotus-shared/miner.addr +# copy genesis file to shared volume +cp /devgen.car /root/.lotus-shared # if miner not already initialized if [ ! -d $LOTUS_MINER_PATH ]; then @@ -47,6 +47,9 @@ if [ ! -d $LOTUS_MINER_PATH ]; then lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=/root/data/.genesis-sectors --pre-sealed-metadata=/root/data/.genesis-sectors/pre-seal-t01000.json --nosync fi +# publish bootnode peer info to shared volume +lotus net listen | grep "$(ip addr | grep inet | grep -v '127.0.0.1' | sort | head -1 | awk '{print $2}' | cut -d '/' -f1)" | head -1 > /root/.lotus-shared/miner.addr + # start miner nohup lotus-miner run --nosync &