tradecraftio / tradecraft

Tradecraft integration/staging tree https://tradecraft.io/download
Other
13 stars 9 forks source link

[Stratum] Prevent sending double work notification to miner that finds block #76

Closed maaku closed 4 years ago

maaku commented 4 years ago

When responding to a new block notification and sending updated work to miners, ignore clients that are already working on the new block. Typically this is just the miner that found the block, who was immediately sent a work update when they submitted their winning share. The code is updated to avoid sending work to that miner again when the new-block notification is handled, moments later. Due to race conditions there could be more than one miner that have already received an update, however, so we check each miner rather than jus flagging the one that found a block.

maaku commented 4 years ago

Oh, fixes #75