mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 22:59:27 +00:00
fix: malformated values and private round type
This commit is contained in:
parent
4c9425f986
commit
c9934ab7e5
2 changed files with 5 additions and 3 deletions
|
@ -75,6 +75,7 @@ impl Helper {
|
||||||
"P2pool | PTY getting current estimated HR data from status: {} KH/s",
|
"P2pool | PTY getting current estimated HR data from status: {} KH/s",
|
||||||
ehr
|
ehr
|
||||||
);
|
);
|
||||||
|
// multiply by a thousand because value is given as kH/s instead H/s
|
||||||
lock!(gui_api).sidechain_ehr = ehr * 1000.0;
|
lock!(gui_api).sidechain_ehr = ehr * 1000.0;
|
||||||
} else {
|
} else {
|
||||||
error!("P2pool | PTY Getting data from status: Lines contains Your shares but no value found: {}", line);
|
error!("P2pool | PTY Getting data from status: Lines contains Your shares but no value found: {}", line);
|
||||||
|
|
|
@ -720,7 +720,8 @@ impl XvbPrivStats {
|
||||||
min_hr = 0.0;
|
min_hr = 0.0;
|
||||||
}
|
}
|
||||||
debug!("Xvb Process | hr {}, min_hr: {} ", lhr, min_hr);
|
debug!("Xvb Process | hr {}, min_hr: {} ", lhr, min_hr);
|
||||||
let msg = format!("local HR from Xmrig is {} kH/s, minimum required HR to keep a share in PPLNS window is {} k/s, there was {} kH/s estimated sent for your address on p2pool", Float::from_3(lhr.into()), Float::from_3(min_hr.into()), Float::from_3(p2pool_ehr.into()));
|
// numbers are divided by a thousands to print kH/s and not H/s
|
||||||
|
let msg = format!("local HR from Xmrig is {} kH/s, minimum required HR to keep a share in PPLNS window is {} kH/s, there was {} kH/s estimated sent for your address on p2pool", Float::from_3((lhr / 1000.0).into()), Float::from_3((min_hr / 1000.0).into()), Float::from_3((p2pool_ehr / 1000.0).into()));
|
||||||
output_console(&gui_api_xvb, &msg);
|
output_console(&gui_api_xvb, &msg);
|
||||||
// calculate how much time can be spared
|
// calculate how much time can be spared
|
||||||
let mut spared_time = Helper::time_that_could_be_spared(lhr, min_hr);
|
let mut spared_time = Helper::time_that_could_be_spared(lhr, min_hr);
|
||||||
|
@ -747,8 +748,8 @@ impl XvbPrivStats {
|
||||||
if share > 0 {
|
if share > 0 {
|
||||||
let stats_priv = &lock!(pub_api).stats_priv;
|
let stats_priv = &lock!(pub_api).stats_priv;
|
||||||
match (
|
match (
|
||||||
stats_priv.donor_1hr_avg as u32,
|
(stats_priv.donor_1hr_avg * 1000.0) as u32,
|
||||||
stats_priv.donor_24hr_avg as u32,
|
(stats_priv.donor_24hr_avg * 1000.0) as u32,
|
||||||
) {
|
) {
|
||||||
x if x.0 > XVB_ROUND_DONOR_MEGA_MIN_HR && x.1 > XVB_ROUND_DONOR_MEGA_MIN_HR => {
|
x if x.0 > XVB_ROUND_DONOR_MEGA_MIN_HR && x.1 > XVB_ROUND_DONOR_MEGA_MIN_HR => {
|
||||||
Some(XvbRound::DonorMega)
|
Some(XvbRound::DonorMega)
|
||||||
|
|
Loading…
Reference in a new issue