diff --git a/src/lean_spec/node/sync/head_sync.py b/src/lean_spec/node/sync/head_sync.py index 1322b8ad..75e9fa8a 100644 --- a/src/lean_spec/node/sync/head_sync.py +++ b/src/lean_spec/node/sync/head_sync.py @@ -63,16 +63,12 @@ class HeadSyncResult: """ Result of processing a gossip block. - The SyncService only branches on the processed flag; the error string is - retained for incident-response logs and post-mortem inspection. + The SyncService only branches on the processed flag. """ processed: bool """True if the block was immediately integrated into the Store.""" - error: str | None = None - """Error message if processing failed.""" - @dataclass(slots=True) class HeadSync: @@ -236,7 +232,6 @@ async def _process_block_with_descendants( ) return HeadSyncResult( processed=False, - error=str(exception), ), store # Process cached descendants. diff --git a/tests/node/sync/test_head_sync.py b/tests/node/sync/test_head_sync.py index bf001709..9ed5715c 100644 --- a/tests/node/sync/test_head_sync.py +++ b/tests/node/sync/test_head_sync.py @@ -270,12 +270,12 @@ def track_processing(s: Any, block: SignedBlock) -> Any: class TestErrorHandling: """Tests for error handling during block processing.""" - async def test_processing_error_captured_in_result( + async def test_processing_error_reported_as_not_processed( self, genesis_block, peer_id: PeerId, ) -> None: - """Processing errors are captured in the result, not raised.""" + """Processing errors are swallowed, reported as not processed, never raised.""" genesis_root = hash_tree_root(genesis_block) store = cast(Store, MockForkchoiceStore()) store.blocks[genesis_root] = genesis_block @@ -300,7 +300,6 @@ def fail_processing(s: Any, b: SignedBlock) -> Any: assert head_sync_result == HeadSyncResult( processed=False, - error="State transition failed", ) assert returned_store is store # Original store returned on error