[miner] Add ability for a miner to resume its tenure if it comes online in the middle of one
Opened this issue · 0 comments
jferrant commented
Currently there doesn't seem to be any logic for a miner that restarts in the middle of a tenure to continue mining blocks. Similarly a miner that crashes before it starts its tenure and comes online in the middle of its tenure fails to mine stacks blocks.
We might need to add a new miner directive like "resume_tenure" which will check if it is the winning miner. If it was, it needs to check if it already issued the necessary tenure change payload transactions, issue it if required, and continue mining stacks blocks as before. Take a look at how we currently handle empty sortitions using the MinerReason::EmptyTenure as there might be some code reuse here.
Relates to #5361