feat: more log for API request xmrig/xmrig-proxy

This commit is contained in:
Cyrix126 2024-07-20 14:17:21 +02:00
parent a7b6a10485
commit cc037096ee
2 changed files with 5 additions and 2 deletions

View file

@ -27,7 +27,10 @@ pub async fn update_xmrig_config(
let mut config = request.send().await?.json::<Value>().await?;
// modify node configuration
let uri = [node.url(), ":".to_string(), node.port()].concat();
info!("replace xmrig config with node {}", uri);
info!(
"replace xmrig from api url {api_uri} config with node {}",
uri
);
*config
.pointer_mut("/pools/0/url")
.ok_or_else(|| anyhow!("pools/0/url does not exist in xmrig config"))? = uri.into();

View file

@ -283,7 +283,7 @@ pub(crate) async fn algorithm(
// request XMrig to mine on P2pool
// if share is in PW,
let msg_xmrig_or_xp = if xp_alive { "XMRig-Proxy" } else { "XMRig" };
info!("xp alive: {:?}", xp_alive);
let api_url = api_url_xmrig(xp_alive, true);
if share > 0 {
debug!("Xvb Process | Algorithm share is in current window");