From 6dcb393fce017b9b8a47d5f8621b85c891ee1ec9 Mon Sep 17 00:00:00 2001 From: Cyrix126 Date: Thu, 28 Mar 2024 22:38:04 +0100 Subject: [PATCH] feat: beta release v0.1.5 --- CHANGELOG.md | 16 ++++++ Cargo.lock | 6 +-- Cargo.toml | 2 +- src/helper/xvb.rs | 128 +++++++++++++++++++++++++++------------------- 4 files changed, 96 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4023d32..d54cbad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# v0.1.5 +Fix release for beta version. +This version is only made for testing purposes and have feedbacks. + +## Changes +update dependencies of UI +replace old http client + +## Fixes +fix formatting hr algorithm +fix private round calculation + +## Bundled Versions +* [`P2Pool v3.10`](https://github.com/SChernykh/p2pool/releases/tag/v3.10) +* [`XMRig v6.21.1`](https://github.com/xmrig/xmrig/releases/tag/v6.21.1) + # v0.1.4 Fix release for beta version. This version is only made for testing purposes and have feedbacks. diff --git a/Cargo.lock b/Cargo.lock index 6f146ad..89d5483 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2070,7 +2070,7 @@ dependencies = [ [[package]] name = "gupaxx" -version = "0.1.4" +version = "0.1.5" dependencies = [ "anyhow", "benri", @@ -3176,9 +3176,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index b27ea14..e45b26d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ cargo-features = ["profile-rustflags"] [package] name = "gupaxx" -version = "0.1.4" +version = "0.1.5" authors = ["cyrix126 "] description = "Fork of Gupax integrating the XMRvsBeast Raffle " documentation = "https://github.com/cyrix126/gupaxx" diff --git a/src/helper/xvb.rs b/src/helper/xvb.rs index 9b57686..be84cbe 100644 --- a/src/helper/xvb.rs +++ b/src/helper/xvb.rs @@ -1090,10 +1090,12 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::Vip) @@ -1109,10 +1111,12 @@ mod test { ); assert_eq!(given_time, 96); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::Vip) @@ -1133,10 +1137,12 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::Donor) @@ -1152,10 +1158,12 @@ mod test { ); assert_eq!(given_time, 204); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::Donor) @@ -1176,10 +1184,12 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorVip) @@ -1195,10 +1205,12 @@ mod test { ); assert_eq!(given_time, 446); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorVip) @@ -1219,10 +1231,12 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorWhale) @@ -1238,10 +1252,12 @@ mod test { ); assert_eq!(given_time, 573); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorWhale) @@ -1262,10 +1278,12 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorMega) @@ -1281,10 +1299,12 @@ mod test { ); assert_eq!(given_time, 597); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = - (given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) + * lock!(gui_api_xmrig).hashrate_raw_15m) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorMega) @@ -1306,12 +1326,14 @@ mod test { // given time should always be less than XVB_TIME_ALGO assert!(given_time < XVB_TIME_ALGO); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) - * lock!(gui_api_xmrig).hashrate_raw_15m) - + 5000.0; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) - * lock!(gui_api_xmrig).hashrate_raw_15m) - + 5000.0; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = + (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m) + + 5000.0) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = + (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m) + + 5000.0) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorVip) @@ -1328,12 +1350,14 @@ mod test { ); assert_eq!(given_time, 378); // verify that right round should be detected. - lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) - * lock!(gui_api_xmrig).hashrate_raw_15m) - + 5000.0; - lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) - * lock!(gui_api_xmrig).hashrate_raw_15m) - + 5000.0; + lock!(gui_api_xvb).stats_priv.donor_1hr_avg = + (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m) + + 5000.0) + / 1000.0; + lock!(gui_api_xvb).stats_priv.donor_24hr_avg = + (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m) + + 5000.0) + / 1000.0; assert_eq!( XvbPrivStats::round_type(share, &gui_api_xvb), Some(XvbRound::DonorVip)