0xPolygonHermez / cdk-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
35 stars 39 forks source link

test: add unit test for Stage: data_stream_catch_up #1456

Closed tclemos closed 1 week ago

tclemos commented 1 week ago

This PR adds a unit test for the ./zk/stage/stage_data_stream_catch_up.go

Since the data stream is a feature exclusively for cdk-erigon, I refactored the code to make these components testable. It adds a factory to help test components instantiating StreamServer and DataStreamServer and also provides interfaces for these implementations, allowing them to be mocked during tests.