- Convert _propose_block, _ensure_genesis_block to async methods in PoAProposer - Add await to gossip_broker.publish calls in block broadcasting - Add await to _ensure_genesis_block and _propose_block method calls - Update coordinator-api Python version constraint to >=3.13,<3.15 - Add torch ^2.10.0 dependency to coordinator-api - Add make_asgi_app import to prometheus_client in main.py - Export new routers: global
12 lines
501 B
Diff
12 lines
501 B
Diff
--- a/apps/blockchain-node/src/aitbc_chain/consensus/poa.py
|
|
+++ b/apps/blockchain-node/src/aitbc_chain/consensus/poa.py
|
|
@@ -194,7 +194,7 @@
|
|
except Exception as e:
|
|
logger.error(f"Failed to propose block: {e}")
|
|
|
|
- def _ensure_genesis_block(self) -> None:
|
|
+ async def _ensure_genesis_block(self) -> None:
|
|
"""Ensure genesis block exists"""
|
|
with self.session_factory() as session:
|
|
if session.exec(select(Block).where(Block.height == 0)).first():
|