Fix missing _fetch_chain_head method in PoAProposer
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 5s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 13s
Deploy to Testnet / deploy-testnet (push) Successful in 1m37s
Integration Tests / test-service-integration (push) Successful in 2m11s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 3s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 3s
Multi-Node Stress Testing / stress-test (push) Successful in 3s
Node Failover Simulation / failover-test (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 25s
Security Scanning / security-scan (push) Successful in 35s
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 5s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 13s
Deploy to Testnet / deploy-testnet (push) Successful in 1m37s
Integration Tests / test-service-integration (push) Successful in 2m11s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 3s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 3s
Multi-Node Stress Testing / stress-test (push) Successful in 3s
Node Failover Simulation / failover-test (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 25s
Security Scanning / security-scan (push) Successful in 35s
This commit is contained in:
@@ -109,6 +109,14 @@ class PoAProposer:
|
||||
self._last_proposer_id: Optional[str] = None
|
||||
self._last_block_timestamp: Optional[datetime] = None
|
||||
|
||||
def _fetch_chain_head(self) -> Optional[Block]:
|
||||
"""Fetch the current chain head block from the database."""
|
||||
from ..database import session_scope
|
||||
with session_scope(self._config.chain_id) as session:
|
||||
return session.exec(
|
||||
select(Block).where(Block.chain_id == self._config.chain_id).order_by(Block.height.desc()).limit(1)
|
||||
).first()
|
||||
|
||||
async def start(self) -> None:
|
||||
if self._task is not None:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user