p2pool_api: local/stats -> local/stratum

This commit is contained in:
hinto.janai 2023-03-30 09:45:21 -04:00
parent 277a60c3bf
commit 40992d82a9
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 4 additions and 4 deletions

View file

@ -71,13 +71,13 @@ r#"*---------------------------------------*
*---------------------------------------*"#;
// P2Pool & XMRig default API stuff
#[cfg(target_os = "windows")]
pub const P2POOL_API_PATH_LOCAL: &str = r"local\stats";
pub const P2POOL_API_PATH_LOCAL: &str = r"local\stratum";
#[cfg(target_os = "windows")]
pub const P2POOL_API_PATH_NETWORK: &str = r"network\stats";
#[cfg(target_os = "windows")]
pub const P2POOL_API_PATH_POOL: &str = r"pool\stats";
#[cfg(target_family = "unix")]
pub const P2POOL_API_PATH_LOCAL: &str = "local/stats";
pub const P2POOL_API_PATH_LOCAL: &str = "local/stratum";
#[cfg(target_family = "unix")]
pub const P2POOL_API_PATH_NETWORK: &str = "network/stats";
#[cfg(target_family = "unix")]

View file

@ -1596,7 +1596,7 @@ impl PubP2poolApi {
}
//---------------------------------------------------------------------------------------------------- Private P2Pool "Local" Api
// This matches directly to P2Pool's [local/stats] JSON API file (excluding a few stats).
// This matches directly to P2Pool's [local/stratum] JSON API file (excluding a few stats).
// P2Pool seems to initialize all stats at 0 (or 0.0), so no [Option] wrapper seems needed.
#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
struct PrivP2poolLocalApi {
@ -1606,7 +1606,7 @@ struct PrivP2poolLocalApi {
shares_found: u64,
average_effort: f32,
current_effort: f32,
connections: u16, // No one will have more than 65535 connections... right?
connections: u32, // This is a `uint32_t` in `p2pool`
}
impl Default for PrivP2poolLocalApi { fn default() -> Self { Self::new() } }