bug: update API unlocker format.
This commit is contained in:
@@ -165,7 +165,7 @@ class BaseMinerRPCAPI:
|
|||||||
for func in
|
for func in
|
||||||
# each function in self
|
# each function in self
|
||||||
dir(self)
|
dir(self)
|
||||||
if not func == "commands"
|
if not func in ["commands", "open_api"]
|
||||||
if callable(getattr(self, func)) and
|
if callable(getattr(self, func)) and
|
||||||
# no __ or _ methods
|
# no __ or _ methods
|
||||||
not func.startswith("__") and not func.startswith("_") and
|
not func.startswith("__") and not func.startswith("_") and
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
|
|||||||
stage1_req = (
|
stage1_req = (
|
||||||
await c.post(
|
await c.post(
|
||||||
"https://wmt.pyasic.org/v1/stage1",
|
"https://wmt.pyasic.org/v1/stage1",
|
||||||
json={"ip": self.ip},
|
json={"ip": str(self.ip)},
|
||||||
follow_redirects=True,
|
follow_redirects=True,
|
||||||
)
|
)
|
||||||
).json()
|
).json()
|
||||||
@@ -359,7 +359,10 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
|
|||||||
stage2_req = (
|
stage2_req = (
|
||||||
await c.post(
|
await c.post(
|
||||||
"https://wmt.pyasic.org/v1/stage2",
|
"https://wmt.pyasic.org/v1/stage2",
|
||||||
json={"ip": self.ip, "stage1_result": stage1_res.decode("utf-8")},
|
json={
|
||||||
|
"ip": str(self.ip),
|
||||||
|
"stage1_result": stage1_res.decode("utf-8"),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
).json()
|
).json()
|
||||||
for command in stage2_req:
|
for command in stage2_req:
|
||||||
|
|||||||
Reference in New Issue
Block a user