func (pow *ProofOfWork) Work(cores int) {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	found := make(chan uint64)
	for i := 0; i < cores; i++ {
		go pow.workOnCore(ctx, uint64(i), uint64(cores), found)
	}
	pow.Proof = <-found
}
// Work actually does the proof-of-work on the given amount of cores
Work actually does the proof-of-work on the given amount of cores
// Work actually does the proof - of - work on the given amount of cores
func (pow *ProofOfWork) Work(cores int) {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	found := make(chan uint64)
	for i := 0; i < cores; i++ {
		go pow.workOnCore(ctx, uint64(i), uint64(cores), found)
	}
	pow.Proof = <-found
}
func ( pow * ProofOfWork ) Work ( cores int ) { ctx , cancel := context . WithCancel ( context . Background ( ) ) defer cancel ( ) found := make ( chan uint64 ) for i := 0 ; i < cores ; i ++ { go pow . workOnCore ( ctx , uint64 ( i ) , uint64 ( cores ) , found ) } pow . Proof = <- found }
Work actually does the proof-of-work on the given amount of cores
Work actually does the proof - of - work on the given amount of cores