diff --git a/src/steps/da.py b/src/steps/da.py index 9f3740e..a6d4e8a 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -44,11 +44,6 @@ def response_contains_data(response): return False -def prepare_add_share_request(da_share): - da_share["share_idx"] = 137 - return da_share - - class StepsDataAvailability(StepsCommon): def find_executor_node(self): executor = {} @@ -138,12 +133,10 @@ class StepsDataAvailability(StepsCommon): timeout_duration = kwargs.get("timeout_duration", 65) interval = kwargs.get("interval", 0.1) - data = prepare_add_share_request(da_share) - @retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(interval), reraise=True) def add_share(): try: - response = node.send_add_share_request(data) + response = node.send_add_share_request(da_share) except Exception as ex: logger.error(f"Exception while adding share: {ex}") raise diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index a8b982a..55a85fe 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -25,7 +25,14 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) - logger.debug(f"da_shares: {da_shares}") - logger.debug(f"{len(da_shares)} da_shares extracted") + modified_da_share = da_shares[0] + modified_da_share["share_idx"] = 7 - self.add_publish_share(self.node2, da_shares[0]) + self.add_publish_share(self.node2, modified_da_share) + + index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(8)) + da_shares = extract_da_shares(index_shares) + + delay(5) + + assert len(da_shares) < 3, "Modified da_share should not get published"