mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-24 07:15:17 +00:00
b9c6e43617
* Construct wrong proof. * Enforce rear padding data check for segment proofs.
25 lines
789 B
Python
Executable File
25 lines
789 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from test_framework.test_framework import TestFramework
|
|
from utility.submission import create_submission, submit_data
|
|
from utility.utils import wait_until
|
|
|
|
|
|
class ExampleTest(TestFramework):
|
|
def run_test(self):
|
|
client = self.nodes[0]
|
|
|
|
chunk_data = b"\x02" * 5253123
|
|
submissions, data_root = create_submission(chunk_data)
|
|
self.contract.submit(submissions)
|
|
wait_until(lambda: self.contract.num_submissions() == 1)
|
|
wait_until(lambda: client.zgs_get_file_info(data_root) is not None)
|
|
|
|
segment = submit_data(client, chunk_data)
|
|
self.log.info("segment: %s", len(segment))
|
|
wait_until(lambda: client.zgs_get_file_info(data_root)["finalized"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
ExampleTest().main()
|