fix: improve blockchain node RPC responses and database path consistency
- Add transaction data to RPC responses (get_block, get_blocks_range) - Fix import_block to handle transactions parameter - Change database paths to absolute paths for consistency - Make dev_heartbeat.py executable
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
|
||||
from sqlmodel import create_engine, SQLModel
|
||||
from sqlalchemy import StaticPool
|
||||
from .config import settings
|
||||
|
||||
# Create in-memory SQLite database for now
|
||||
# Create database engine using URL from config
|
||||
engine = create_engine(
|
||||
"sqlite:///./data/coordinator.db",
|
||||
connect_args={"check_same_thread": False},
|
||||
poolclass=StaticPool,
|
||||
echo=True # Enable SQL logging for debugging
|
||||
settings.database_url,
|
||||
connect_args={"check_same_thread": False} if settings.database_url.startswith("sqlite") else {},
|
||||
poolclass=StaticPool if settings.database_url.startswith("sqlite") else None,
|
||||
echo=settings.test_mode # Enable SQL logging for debugging in test mode
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user