diff --git a/tests/utility/submission.py b/tests/utility/submission.py index 1421811..a9fd80f 100644 --- a/tests/utility/submission.py +++ b/tests/utility/submission.py @@ -194,9 +194,14 @@ def generate_merkle_tree_by_batch(data): def submit_data(client, data): + shard_config = client.rpc.zgs_getShardConfig() + shard_id = int(shard_config["shardId"]) + num_shard = int(shard_config["numShard"]) + segments = data_to_segments(data) - for segment in segments: - client.zgs_upload_segment(segment) + for index, segment in enumerate(segments): + if index % num_shard == shard_id: + client.zgs_upload_segment(segment) return segments