cjdelisle / packetcrypt_rs

PacketCrypt in Rust
53 stars 45 forks source link

Fixed work tip height detection #59

Closed UCIS closed 1 year ago

UCIS commented 1 year ago

When a change in pool annhandler configuration is detected by the announcement miner, the update_work_cycle function is invoked without any update_blocks. In the old situation this would result in the top variable remaining at 0 and the announcement miner potentially selecting an incorrect slot from recent_work to start mining, resulting in invalid or outdated announcements being generated until the next block is discovered. This PR fixes that by selecting the best block height from the recent_work set instead of the (possibly empty) update_blocks.

cjdelisle commented 1 year ago

Thanks!