mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-03-29 18:49:02 +00:00
fix: release v1.8.1
fix deadlock
This commit is contained in:
parent
4d4bcd689f
commit
0606cdf7aa
4 changed files with 42 additions and 35 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -725,9 +725,9 @@ checksum = "2225b558afc76c596898f5f1b3fc35cfce0eb1b13635cbd7d1b2a7177dc10ccd"
|
|||
|
||||
[[package]]
|
||||
name = "built"
|
||||
version = "0.7.5"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b"
|
||||
checksum = "73848a43c5d63a1251d17adf6c2bf78aa94830e60a335a95eeea45d6ba9e1e4d"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
|
@ -1633,9 +1633,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "filedescriptor"
|
||||
version = "0.8.2"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"
|
||||
checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"thiserror 1.0.69",
|
||||
|
@ -2042,7 +2042,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gupaxx"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"benri",
|
||||
|
@ -4822,9 +4822,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.22.23"
|
||||
version = "0.22.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee"
|
||||
checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
|
@ -5990,9 +5990,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.1"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f"
|
||||
checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cargo-features = ["profile-rustflags", "codegen-backend"]
|
||||
[package]
|
||||
name = "gupaxx"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
authors = ["cyrix126 <gupaxx@baermail.fr>"]
|
||||
description = "Fork of Gupax integrating the XMRvsBeast Raffle "
|
||||
documentation = "https://github.com/cyrix126/gupaxx"
|
||||
|
|
|
@ -645,23 +645,25 @@ impl Helper {
|
|||
}
|
||||
// Always update from output
|
||||
debug!("XMRig Watchdog | Starting [update_from_output()]");
|
||||
let mut process_lock = process.lock().unwrap();
|
||||
let mut pub_api_lock = pub_api.lock().unwrap();
|
||||
PubXmrigApi::update_from_output(
|
||||
&mut pub_api_lock,
|
||||
&output_pub,
|
||||
&output_parse,
|
||||
start.elapsed(),
|
||||
&mut process_lock,
|
||||
&process_p2pool.lock().unwrap(),
|
||||
&process_xp.lock().unwrap(),
|
||||
proxy_img,
|
||||
p2pool_img,
|
||||
proxy_state,
|
||||
p2pool_state,
|
||||
);
|
||||
drop(pub_api_lock);
|
||||
drop(process_lock);
|
||||
{
|
||||
let process_p2pool_lock = &process_p2pool.lock().unwrap();
|
||||
let mut process_lock = process.lock().unwrap();
|
||||
let process_xp_lock = &process_xp.lock().unwrap();
|
||||
let mut pub_api_lock = pub_api.lock().unwrap();
|
||||
PubXmrigApi::update_from_output(
|
||||
&mut pub_api_lock,
|
||||
&output_pub,
|
||||
&output_parse,
|
||||
start.elapsed(),
|
||||
&mut process_lock,
|
||||
process_p2pool_lock,
|
||||
process_xp_lock,
|
||||
proxy_img,
|
||||
p2pool_img,
|
||||
proxy_state,
|
||||
p2pool_state,
|
||||
);
|
||||
}
|
||||
// Send an HTTP API request
|
||||
debug!("XMRig Watchdog | Attempting HTTP API request...");
|
||||
match PrivXmrigApi::request_xmrig_api(&client, &api_uri_summary, token).await {
|
||||
|
@ -677,22 +679,26 @@ impl Helper {
|
|||
}
|
||||
}
|
||||
// if mining on proxy and proxy is not alive, switch back to p2pool node
|
||||
if (pub_api.lock().unwrap().pool
|
||||
debug!("update from priv ok");
|
||||
// unlock first process_xp and then pub_api
|
||||
let process_p2pool_lock = &process_p2pool.lock().unwrap();
|
||||
let process_xp_lock = &process_xp.lock().unwrap();
|
||||
let pub_api_lock = pub_api.lock().unwrap();
|
||||
if (pub_api_lock.pool
|
||||
== Some(Pool::XmrigProxy(
|
||||
proxy_state
|
||||
.current_ports(&process_xp.lock().unwrap(), &proxy_img.lock().unwrap())
|
||||
.current_ports(process_xp_lock, &proxy_img.lock().unwrap())
|
||||
.0,
|
||||
))
|
||||
|| pub_api.lock().unwrap().pool.is_none())
|
||||
&& !process_xp.lock().unwrap().is_alive()
|
||||
&& process_p2pool.lock().unwrap().is_alive()
|
||||
|| pub_api_lock.pool.is_none())
|
||||
&& !process_xp_lock.is_alive()
|
||||
&& process_p2pool_lock.is_alive()
|
||||
{
|
||||
info!(
|
||||
"XMRig Process | redirect xmrig to p2pool since XMRig-Proxy is not alive and p2pool is alive"
|
||||
);
|
||||
let pool = Pool::P2pool(
|
||||
p2pool_state
|
||||
.current_port(&process_p2pool.lock().unwrap(), &p2pool_img.lock().unwrap()),
|
||||
p2pool_state.current_port(process_p2pool_lock, &p2pool_img.lock().unwrap()),
|
||||
);
|
||||
if let Err(err) = update_xmrig_config(
|
||||
&client,
|
||||
|
|
|
@ -502,6 +502,7 @@ impl Helper {
|
|||
// Always update from output
|
||||
// todo: check difference with xmrig
|
||||
debug!("XMRig-Proxy Watchdog | Starting [update_from_output()]");
|
||||
let process_p2pool_lock = process_p2pool.lock().unwrap();
|
||||
let mut process_lock = process.lock().unwrap();
|
||||
let mut pub_api_lock = pub_api.lock().unwrap();
|
||||
PubXmrigProxyApi::update_from_output(
|
||||
|
@ -510,7 +511,7 @@ impl Helper {
|
|||
&output_parse,
|
||||
start.elapsed(),
|
||||
&mut process_lock,
|
||||
&process_p2pool.lock().unwrap(),
|
||||
&process_p2pool_lock,
|
||||
p2pool_img,
|
||||
p2pool_state,
|
||||
state,
|
||||
|
|
Loading…
Reference in a new issue