mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-03-29 18:49:02 +00:00
fix: regex to detect new pool
This commit is contained in:
parent
f7223b55b4
commit
0ecfbd4ce4
1 changed files with 2 additions and 6 deletions
|
@ -157,12 +157,8 @@ pub fn nb_current_shares(s: &str) -> Option<u32> {
|
|||
None
|
||||
}
|
||||
pub fn detect_pool_xmrig(s: &str, proxy_port: u16, p2pool_port: u16) -> Option<Pool> {
|
||||
static CURRENT_SHARE: Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new(
|
||||
r"(use pool|new job from) (?P<pool>(?:[0-9]{1,3}\.){3}[0-9]{1,3}:\d{1,5})(| diff)",
|
||||
)
|
||||
.unwrap()
|
||||
});
|
||||
static CURRENT_SHARE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"(use pool|new job from) (?P<pool>.*:\d{1,5})(| diff)").unwrap());
|
||||
if let Some(c) = CURRENT_SHARE.captures(s) {
|
||||
if let Some(m) = c.name("pool") {
|
||||
match m.as_str() {
|
||||
|
|
Loading…
Reference in a new issue