@@ -37,7 +37,7 @@ use std::fs::File;
37
37
use std:: io:: prelude:: * ;
38
38
use std:: io:: BufReader ;
39
39
use std:: net:: { SocketAddr , TcpStream , ToSocketAddrs } ;
40
- use std:: time:: Duration ;
40
+ use std:: time:: { Duration , Instant } ;
41
41
use std:: { env, fs, io, process, thread} ;
42
42
43
43
use blockstack_lib:: burnchains:: bitcoin:: { spv, BitcoinNetworkType } ;
@@ -605,7 +605,7 @@ Given a <working-dir>, obtain a 2100 header hash block inventory (with an empty
605
605
let chain_tip = SortitionDB :: get_canonical_burn_chain_tip ( sort_db. conn ( ) )
606
606
. expect ( "Failed to get sortition chain tip" ) ;
607
607
608
- let start = time :: Instant :: now ( ) ;
608
+ let start = Instant :: now ( ) ;
609
609
610
610
let header_hashes = {
611
611
let ic = sort_db. index_conn ( ) ;
@@ -614,14 +614,11 @@ Given a <working-dir>, obtain a 2100 header hash block inventory (with an empty
614
614
. unwrap ( )
615
615
} ;
616
616
617
- println ! (
618
- "Fetched header hashes in {}" ,
619
- start. elapsed( ) . as_seconds_f32( )
620
- ) ;
621
- let start = time:: Instant :: now ( ) ;
617
+ println ! ( "Fetched header hashes in {}" , start. elapsed( ) . as_secs_f32( ) ) ;
618
+ let start = Instant :: now ( ) ;
622
619
623
620
let block_inv = chain_state. get_blocks_inventory ( & header_hashes) . unwrap ( ) ;
624
- println ! ( "Fetched block inv in {}" , start. elapsed( ) . as_seconds_f32 ( ) ) ;
621
+ println ! ( "Fetched block inv in {}" , start. elapsed( ) . as_secs_f32 ( ) ) ;
625
622
println ! ( "{:?}" , & block_inv) ;
626
623
627
624
println ! ( "Done!" ) ;
@@ -652,7 +649,7 @@ check if the associated microblocks can be downloaded
652
649
let chain_tip = SortitionDB :: get_canonical_burn_chain_tip ( sort_db. conn ( ) )
653
650
. expect ( "Failed to get sortition chain tip" ) ;
654
651
655
- let start = time :: Instant :: now ( ) ;
652
+ let start = Instant :: now ( ) ;
656
653
let local_peer = LocalPeer :: new (
657
654
0 ,
658
655
0 ,
@@ -671,12 +668,9 @@ check if the associated microblocks can be downloaded
671
668
. unwrap ( )
672
669
} ;
673
670
674
- println ! (
675
- "Fetched header hashes in {}" ,
676
- start. elapsed( ) . as_seconds_f32( )
677
- ) ;
671
+ println ! ( "Fetched header hashes in {}" , start. elapsed( ) . as_secs_f32( ) ) ;
678
672
679
- let start = time :: Instant :: now ( ) ;
673
+ let start = Instant :: now ( ) ;
680
674
let mut total_load_headers = 0 ;
681
675
682
676
for ( consensus_hash, block_hash_opt) in header_hashes. iter ( ) {
@@ -736,7 +730,7 @@ check if the associated microblocks can be downloaded
736
730
737
731
println ! (
738
732
"Checked can_download in {} (headers load took {}ms)" ,
739
- start. elapsed( ) . as_seconds_f32 ( ) ,
733
+ start. elapsed( ) . as_secs_f32 ( ) ,
740
734
total_load_headers
741
735
) ;
742
736
0 commit comments