Created
September 6, 2022 19:59
-
-
Save nonsense/e0b3d2424a094f4c9ab43d8f4f2ac5d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
sectors=`lotus-miner sectors list | grep Available | grep -v "24 weeks" | awk '{print $1}' | paste -s -d' ' | tr -d '"'` | |
sectors_array=(`echo ${sectors}`); | |
epoch=`lotus status | grep Sync | awk '{print $3}'` | |
nextepoch=$((1555200+$epoch)) | |
lotus-miner sectors extend --new-expiration $nextepoch ${sectors_array[@]} |
@Angelo-gh3990 --fast
doesn't return the expiration for the sectors, so we wouldn't know which Available
sectors to extend. Or are you suggesting just always extending all Available sectors?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@nonsense thank you for putting this together!
I would add --fast to line 3, works faster and has less impact on the execution.
Like:
lotus-miner sectors list --fast | grep Available | grep -v "24 weeks" | awk '{print $1}' | paste -s -d' ' | tr -d '"'`