This commit is contained in:
Doctor Delpy 2025-12-12 01:29:40 +03:00
parent 1def6e3512
commit dd4ff8b8ff
2 changed files with 19 additions and 1 deletions

View File

@ -193,7 +193,11 @@ if __name__ == '__main__':
level='error')
sys.exit(1)
try:
loop = asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
# Background services no longer perform schema initialization
loop.run_until_complete(wrapped_startup_fn(main_memory))

View File

@ -311,6 +311,19 @@ async def s_api_v1_admin_overview(request):
node_id = b58encode(hot_pubkey).decode()
highload_address: Optional[str] = None
try:
from tonsdk.contract.wallet import Wallets
highload_wallet = Wallets.ALL['hv3'](
private_key=service_wallet.options['private_key'],
public_key=service_wallet.options['public_key'],
wc=0,
)
highload_address = highload_wallet.address.to_string(1, 1, 1)
except Exception as exc: # pragma: no cover
make_log("Admin", f"Failed to compute highload wallet address: {exc}", level="error")
overview_payload = {
'project': {
'host': PROJECT_HOST,
@ -325,6 +338,7 @@ async def s_api_v1_admin_overview(request):
'id': node_id,
'service_wallet': service_wallet.address.to_string(1, 1, 1),
'ton_master': platform.address.to_string(1, 1, 1),
'highload_wallet': highload_address,
},
'runtime': {
'python': py_platform.python_version(),