33
44//! Sequencer is the 'brain' of the CT log, responsible for sequencing entries and maintaining log state.
55
6- use std:: time:: Duration ;
6+ use std:: { future :: Future , pin :: Pin , time:: Duration } ;
77
88use crate :: {
99 frontend_worker:: { LandmarkBundle , SubtreeWithConsistencyProof } ,
@@ -155,10 +155,7 @@ async fn get_landmark_subtrees(
155155) -> Result < Vec < SubtreeWithConsistencyProof > > {
156156 let cached_object_backend = CachedRoObjectBucket :: new ( ObjectBucket :: new ( bucket) ) ;
157157 let mut subtrees = Vec :: new ( ) ;
158- let start = Date :: now ( ) . as_millis ( ) ;
159- let it = landmark_sequence. subtrees ( ) . collect :: < Vec < _ > > ( ) ;
160- let num_subtrees = it. len ( ) ;
161- for landmark_subtree in it {
158+ for landmark_subtree in landmark_sequence. subtrees ( ) {
162159 let ( consistency_proof, landmark_subtree_hash) = match prove_subtree_consistency (
163160 checkpoint_hash,
164161 checkpoint_size,
@@ -178,12 +175,6 @@ async fn get_landmark_subtrees(
178175 consistency_proof : consistency_proof. iter ( ) . map ( |h| h. 0 ) . collect ( ) ,
179176 } ) ;
180177 }
181- let end = Date :: now ( ) . as_millis ( ) ;
182- log:: error!( "num subtrees is {num_subtrees}" ) ;
183- log:: error!(
184- "get subtrees was {:.02}ms per subtree" ,
185- ( end - start) as f64 / num_subtrees as f64
186- ) ;
187178
188179 Ok ( subtrees)
189180}
0 commit comments