| 14 | ) |
| 15 | |
| 16 | type NativeWorker struct { |
| 17 | mu sync.Mutex |
| 18 | |
| 19 | workCh chan *Work // miner.engine must call this to send in work |
| 20 | quitCh chan struct{} |
| 21 | quitCurrentOpCh chan struct{} |
| 22 | returnCh chan<- *Result // miner.engine must set this to retrieve the mined block |
| 23 | |
| 24 | chain consensus.ChainReader // need to access blocks |
| 25 | cons consensus.Engine // need to seal methods |
| 26 | |
| 27 | isMining int32 // isMining indicates whether the agent is currently mining |
| 28 | } |
| 29 | |
| 30 | func NewNativeWorker(chain consensus.ChainReader, cons consensus.Engine) *NativeWorker { |
| 31 | worker := &NativeWorker{ |
nothing calls this directly
no outgoing calls
no test coverage detected