Altalogy / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feat: scheduling mining #196

Closed tarnas14 closed 2 years ago

tarnas14 commented 2 years ago

Description

this was a wild ride xD scheduling a callback that every minute checks if any mining should be stopped or started it is a happy path implementation - it just calls mining start/stop, which will in later PR manage manual overrides etc

next PR[s] (see #204)

Motivation and Context

43

How Has This Been Tested?

unit tests manual testing - adding schedules and waiting a couple minutes to see if it works correctly to test schedule recalculation you can use singleSchedulingPeriod in useMiningScheduling(...) call inside /src/pages/home/index.tsx (which is 24h by default)