Diablo-D3/DiabloMiner

Pool failover can change pool out from under ExecutiveState

Diablo-D3 opened this issue · 0 comments

On async requests, GetWorkAsync can change GetWorkParser's networkState to the next pool in sequence while ExecutionState is in flight, leading to blocks sent to the wrong pool. This can only trigger when an async request fails over and sendwork happen concurrently; sync async can never trigger this.

Should be switched to a networkStateIncoming queue, and update() should check networkStateIncoming and networkState.getWorkAsync.add(this) and loop { getWorkIncoming.poll() and check networkStateIncoming again }.