mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
feat: update
This commit is contained in:
@@ -10,15 +10,18 @@ fn chunk_test() {
|
||||
let trace_path = "/assets/traces/1_transfer.json".to_string();
|
||||
let chunk_trace = get_block_trace_from_file(Path::new(&trace_path));
|
||||
let json_str = serde_json::to_string(&chunk_trace).expect("Serialization failed");
|
||||
println!("String: {}", json_str);
|
||||
|
||||
let c_string = CString::new(json_str).expect("CString conversion failed");
|
||||
let c_str_ptr = c_string.as_ptr();
|
||||
|
||||
unsafe {
|
||||
chunk::init_chunk_prover(params.as_ptr(), assets.as_ptr());
|
||||
let mut count = 1;
|
||||
loop {
|
||||
count += 1;
|
||||
println!("count: {}", count);
|
||||
chunk::gen_chunk_proof(c_str_ptr);
|
||||
let duration = Duration::from_millis(100);
|
||||
sleep(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user