( pm smartpool.PoolMonitor, sr smartpool.ShareReceiver, nc smartpool.NetworkClient, cr ClaimRepo, co smartpool.Contract, ca common.Address, ma common.Address, ed string, interval time.Duration, threshold int, hotStop bool)
| 243 | } |
| 244 | |
| 245 | func NewSmartPool( |
| 246 | pm smartpool.PoolMonitor, sr smartpool.ShareReceiver, |
| 247 | nc smartpool.NetworkClient, cr ClaimRepo, co smartpool.Contract, |
| 248 | ca common.Address, ma common.Address, ed string, |
| 249 | interval time.Duration, threshold int, hotStop bool) *SmartPool { |
| 250 | return &SmartPool{ |
| 251 | PoolMonitor: pm, |
| 252 | ShareReceiver: sr, |
| 253 | NetworkClient: nc, |
| 254 | ClaimRepo: cr, |
| 255 | Contract: co, |
| 256 | ContractAddress: ca, |
| 257 | MinerAddress: ma, |
| 258 | ExtraData: ed, |
| 259 | SubmitInterval: interval, |
| 260 | ShareThreshold: threshold, |
| 261 | HotStop: hotStop, |
| 262 | loopStarted: false, |
| 263 | // TODO: should be persist between startups instead of having 0 hardcoded |
| 264 | LatestCounter: big.NewInt(0), |
| 265 | counterMu: sync.RWMutex{}, |
| 266 | runMu: sync.Mutex{}, |
| 267 | } |
| 268 | } |
no outgoing calls