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

Struct SmartPool

protocol/smartpool.go:29–46  ·  view source on GitHub ↗

SmartPool represent smartpool protocol which interacts smartpool high level interfaces and types together to do following procedures: 1. Register the miner if needed 2. Give miner works 3. Accept solutions from miners and construct corresponding shares to add into current active claim. It returns tr

Source from the content-addressed store, hash-verified

27// 5. Then Submit the claim to the contract
28// 6. Then If successful, submit the claim proof to the contract.
29type SmartPool struct {
30 PoolMonitor smartpool.PoolMonitor
31 ShareReceiver smartpool.ShareReceiver
32 NetworkClient smartpool.NetworkClient
33 Contract smartpool.Contract
34 ClaimRepo ClaimRepo
35 LatestCounter *big.Int
36 ContractAddress common.Address
37 MinerAddress common.Address
38 ExtraData string
39 SubmitInterval time.Duration
40 ShareThreshold int
41 HotStop bool
42 loopStarted bool
43 ticker <-chan time.Time
44 counterMu sync.RWMutex
45 runMu sync.Mutex
46}
47
48// Register registers miner address to the contract.
49// It returns false if the miner address couldn't be able to register to the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected