MCPcopy Index your code
hub / github.com/SmartPool/smartpool-client / NewSmartPool

Function NewSmartPool

protocol/smartpool.go:245–268  ·  view source on GitHub ↗
(
	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)

Source from the content-addressed store, hash-verified

243}
244
245func 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}

Callers 1

newTestSmartPoolFunction · 0.85

Calls

no outgoing calls

Tested by 1

newTestSmartPoolFunction · 0.68