Skip to content

Instantly share code, notes, and snippets.

@nonsense
Created September 6, 2022 19:59
Show Gist options
  • Save nonsense/e0b3d2424a094f4c9ab43d8f4f2ac5d3 to your computer and use it in GitHub Desktop.
Save nonsense/e0b3d2424a094f4c9ab43d8f4f2ac5d3 to your computer and use it in GitHub Desktop.
#!/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[@]}
@nonsense
Copy link
Author

@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