Add ENABLE_BLOCK_PRODUCTION check to PoA proposer start() method
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Has been cancelled
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Has been cancelled
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Has been cancelled
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Has been cancelled
Cross-Chain Functionality Tests / aggregate-results (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

- Prevents block production on follower nodes when enable_block_production=false
- Fixes issue where proposer_id in secrets was overriding config setting
- PoA proposer now respects the enable_block_production configuration
This commit is contained in:
aitbc
2026-05-26 18:38:24 +02:00
parent 9ec53892bc
commit 7f1c8794c3

View File

@@ -119,6 +119,11 @@ class PoAProposer:
async def start(self) -> None:
if self._task is not None:
return
# Skip proposer loop if block production is disabled
from ..config import settings
if not getattr(settings, "enable_block_production", True):
self._logger.info("Block production disabled, skipping PoA proposer loop")
return
self._logger.info("Starting PoA proposer loop", extra={"interval": self._config.interval_seconds})
await self._ensure_genesis_block()