formatting
This commit is contained in:
parent
8e344ecf4b
commit
f3e0bd4907
3 changed files with 3 additions and 8 deletions
|
|
@ -390,9 +390,7 @@ async def api_get_mining_stat(stat_slug: str, gerty):
|
||||||
r = await get_mempool_info("hashrate_1m", gerty)
|
r = await get_mempool_info("hashrate_1m", gerty)
|
||||||
data = r
|
data = r
|
||||||
stat["current"] = data["currentDifficulty"]
|
stat["current"] = data["currentDifficulty"]
|
||||||
stat["previous"] = data["difficulty"][len(data["difficulty"]) - 2][
|
stat["previous"] = data["difficulty"][len(data["difficulty"]) - 2]["difficulty"]
|
||||||
"difficulty"
|
|
||||||
]
|
|
||||||
return stat
|
return stat
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -946,5 +944,3 @@ async def get_mempool_stat(stat_slug: str, gerty):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
|
||||||
from fastapi import Request, Depends
|
from fastapi import Depends, Request
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from starlette.exceptions import HTTPException
|
from starlette.exceptions import HTTPException
|
||||||
from starlette.responses import HTMLResponse
|
from starlette.responses import HTMLResponse
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import json
|
import json
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
|
||||||
from fastapi import Query, Depends
|
from fastapi import Depends, Query
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from starlette.exceptions import HTTPException
|
from starlette.exceptions import HTTPException
|
||||||
|
|
||||||
|
|
@ -17,7 +17,6 @@ from .crud import (
|
||||||
get_mempool_info,
|
get_mempool_info,
|
||||||
update_gerty,
|
update_gerty,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .helpers import *
|
from .helpers import *
|
||||||
from .models import Gerty
|
from .models import Gerty
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue