helper: fix [XMR per ...] stat

It was using the [payouts] variable as a base instead of [xmr].
This commit is contained in:
hinto-janaiyo 2022-12-16 13:24:48 -05:00
parent 8f8c37ec57
commit 813a59353e
No known key found for this signature in database
GPG key ID: B1C5A64B80691E45
2 changed files with 3 additions and 3 deletions

View file

@ -530,7 +530,7 @@ Gupax itself uses around 100-300 megabytes of memory.
Gupax also holds up to [500,000 bytes](https://github.com/hinto-janaiyo/gupax/blob/2b80aa027728ddd193bac2e77caa5ddb4323f8fd/src/helper.rs#L63) of log data from `P2Pool/XMRig` to display in the GUI terminals. These logs are reset once over capacity which takes around 1-2 hours. Gupax also holds up to [500,000 bytes](https://github.com/hinto-janaiyo/gupax/blob/2b80aa027728ddd193bac2e77caa5ddb4323f8fd/src/helper.rs#L63) of log data from `P2Pool/XMRig` to display in the GUI terminals. These logs are reset once over capacity which takes around 1-2 hours.
Memory usage should *never* be above 400~ megabytes. If you see Gupax using more than this, please send a bug report. Memory usage should *never* be above 500~ megabytes. If you see Gupax using more than this, please send a bug report.
--- ---

View file

@ -1406,8 +1406,8 @@ impl PubP2poolApi {
// Total XMR // Total XMR
let per_sec = xmr / elapsed_as_secs_f64; let per_sec = xmr / elapsed_as_secs_f64;
let xmr_hour = (per_sec * 60.0) * 60.0; let xmr_hour = (per_sec * 60.0) * 60.0;
let xmr_day = payouts_hour * 24.0; let xmr_day = xmr_hour * 24.0;
let xmr_month = payouts_day * 30.0; let xmr_month = xmr_day * 30.0;
// 6. Mutate the struct with the new info // 6. Mutate the struct with the new info
let mut public = public.lock().unwrap(); let mut public = public.lock().unwrap();