fixed a bug with pool prefix not getting removed when getting data
This commit is contained in:
@@ -203,20 +203,18 @@ class BMMiner(BaseMiner):
|
|||||||
quota = f"{pool_1_quota}/{pool_2_quota}"
|
quota = f"{pool_1_quota}/{pool_2_quota}"
|
||||||
|
|
||||||
if pool_1:
|
if pool_1:
|
||||||
if pool_1.startswith("stratum+tcp://"):
|
pool_1 = pool_1.replace("stratum+tcp://", "").replace(
|
||||||
pool_1.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_1.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_1.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_1_url = pool_1
|
data.pool_1_url = pool_1
|
||||||
|
|
||||||
if pool_1_user:
|
if pool_1_user:
|
||||||
data.pool_1_user = pool_1_user
|
data.pool_1_user = pool_1_user
|
||||||
|
|
||||||
if pool_2:
|
if pool_2:
|
||||||
if pool_2.startswith("stratum+tcp://"):
|
pool_2 = pool_2.replace("stratum+tcp://", "").replace(
|
||||||
pool_2.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_2.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_2.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_2_url = pool_2
|
data.pool_2_url = pool_2
|
||||||
|
|
||||||
if pool_2_user:
|
if pool_2_user:
|
||||||
|
|||||||
@@ -328,16 +328,18 @@ class BOSMiner(BaseMiner):
|
|||||||
quota = f"{pool_1_quota}/{pool_2_quota}"
|
quota = f"{pool_1_quota}/{pool_2_quota}"
|
||||||
|
|
||||||
if pool_1:
|
if pool_1:
|
||||||
pool_1 = pool_1.replace("stratum+tcp://", "")
|
pool_1 = pool_1.replace("stratum+tcp://", "").replace(
|
||||||
pool_1 = pool_1.replace("stratum2+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
|
)
|
||||||
data.pool_1_url = pool_1
|
data.pool_1_url = pool_1
|
||||||
|
|
||||||
if pool_1_user:
|
if pool_1_user:
|
||||||
data.pool_1_user = pool_1_user
|
data.pool_1_user = pool_1_user
|
||||||
|
|
||||||
if pool_2:
|
if pool_2:
|
||||||
pool_2 = pool_2.replace("stratum+tcp://", "")
|
pool_2 = pool_2.replace("stratum+tcp://", "").replace(
|
||||||
pool_2 = pool_2.replace("stratum2+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
|
)
|
||||||
data.pool_2_url = pool_2
|
data.pool_2_url = pool_2
|
||||||
|
|
||||||
if pool_2_user:
|
if pool_2_user:
|
||||||
|
|||||||
@@ -188,20 +188,18 @@ class BTMiner(BaseMiner):
|
|||||||
quota = f"{pool_1_quota}/{pool_2_quota}"
|
quota = f"{pool_1_quota}/{pool_2_quota}"
|
||||||
|
|
||||||
if pool_1:
|
if pool_1:
|
||||||
if pool_1.startswith("stratum+tcp://"):
|
pool_1 = pool_1.replace("stratum+tcp://", "").replace(
|
||||||
pool_1.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_1.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_1.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_1_url = pool_1
|
data.pool_1_url = pool_1
|
||||||
|
|
||||||
if pool_1_user:
|
if pool_1_user:
|
||||||
data.pool_1_user = pool_1_user
|
data.pool_1_user = pool_1_user
|
||||||
|
|
||||||
if pool_2:
|
if pool_2:
|
||||||
if pool_2.startswith("stratum+tcp://"):
|
pool_2 = pool_2.replace("stratum+tcp://", "").replace(
|
||||||
pool_2.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_2.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_2.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_2_url = pool_2
|
data.pool_2_url = pool_2
|
||||||
|
|
||||||
if pool_2_user:
|
if pool_2_user:
|
||||||
|
|||||||
@@ -174,20 +174,18 @@ class CGMiner(BaseMiner):
|
|||||||
quota = f"{pool_1_quota}/{pool_2_quota}"
|
quota = f"{pool_1_quota}/{pool_2_quota}"
|
||||||
|
|
||||||
if pool_1:
|
if pool_1:
|
||||||
if pool_1.startswith("stratum+tcp://"):
|
pool_1 = pool_1.replace("stratum+tcp://", "").replace(
|
||||||
pool_1.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_1.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_1.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_1_url = pool_1
|
data.pool_1_url = pool_1
|
||||||
|
|
||||||
if pool_1_user:
|
if pool_1_user:
|
||||||
data.pool_1_user = pool_1_user
|
data.pool_1_user = pool_1_user
|
||||||
|
|
||||||
if pool_2:
|
if pool_2:
|
||||||
if pool_2.startswith("stratum+tcp://"):
|
pool_2 = pool_2.replace("stratum+tcp://", "").replace(
|
||||||
pool_2.replace("stratum+tcp://", "")
|
"stratum2+tcp://", ""
|
||||||
if pool_2.startswith("stratum2+tcp://"):
|
)
|
||||||
pool_2.replace("stratum2+tcp://", "")
|
|
||||||
data.pool_2_url = pool_2
|
data.pool_2_url = pool_2
|
||||||
|
|
||||||
if pool_2_user:
|
if pool_2_user:
|
||||||
|
|||||||
Reference in New Issue
Block a user