cjdelisle / packetcrypt_rs

PacketCrypt in Rust
54 stars 45 forks source link

Fixed annminer bug/feature that would prevent announcements with lower height than previous batch from being sent to handler #60

Open UCIS opened 1 year ago

UCIS commented 1 year ago

This patch removes an old feature in the announcement miner that would drop announcement batches with a height lower than the previous batch sent to that same handler. This feature prevents mining pools from dynamically altering the mineOld setting as a way to optimize their announcement set, possibly complicating recovery from a chain stall when insufficient mature announcements are available.

A quick test did not show side effects other than the intended behavior. Since all mining threads are halted for mining work changes, and the announcement are placed directly in a queue in the miner callback, there should be no reordering issues between miner threads, out-of-order announcements would only appear as a result of changed mining instructions from the pool.