Migrate blockchain-node app to centralized aitbc package utilities

- Migrate 10 files from logging to aitbc.get_logger
- combined_main.py, p2p_network.py, chain_sync.py
- network/bridge_manager.py, network/island_manager.py, network/nat_traversal.py
- network/multi_chain_manager.py, network/hub_manager.py, network/hub_discovery.py
- Remove logging.basicConfig() from combined_main.py
- Migrate hardcoded paths in config.py and hub_manager.py to use DATA_DIR and KEYSTORE_DIR constants
This commit is contained in:
aitbc
2026-04-25 07:08:16 +02:00
parent 16ae53db4f
commit 4972fa6935
10 changed files with 32 additions and 583 deletions

View File

@@ -5,20 +5,19 @@ Runs both the main blockchain node, P2P placeholder service, and HTTP RPC server
"""
import asyncio
import logging
import sys
from pathlib import Path
# Add src to path
sys.path.insert(0, str(Path(__file__).parent.parent))
from aitbc import get_logger
from aitbc_chain.main import BlockchainNode, _run as run_node
from aitbc_chain.config import settings
from aitbc_chain.app import create_app
import uvicorn
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger = get_logger(__name__)
class CombinedService:
def __init__(self):