@@ -558,6 +558,7 @@ async fn get_history(
558558 . await
559559 . map_err ( Error :: ReadHistoryHttpStream ) ?;
560560
561+ print. clear_previous_line ( ) ;
561562 print. globeln ( format ! ( "Downloaded history {}" , & history_url) ) ;
562563
563564 serde_json:: from_slice :: < History > ( & body) . map_err ( Error :: JsonDecodingHistory )
@@ -616,6 +617,7 @@ async fn get_ledger_metadata_from_archive(
616617
617618 fs:: rename ( & dl_path, & cache_path) . map_err ( Error :: RenameDownloadFile ) ?;
618619
620+ print. clear_previous_line ( ) ;
619621 print. globeln ( format ! ( "Downloaded ledger headers for ledger {ledger}" ) ) ;
620622
621623 // Now read the cached file
@@ -631,8 +633,6 @@ async fn get_ledger_metadata_from_archive(
631633 let close_time = header_entry. header . scp_value . close_time . 0 ;
632634 let base_reserve = header_entry. header . base_reserve ;
633635
634- print. infoln ( format ! ( "Found ledger header for ledger {ledger}" ) ) ;
635-
636636 return Ok ( ( close_time, base_reserve) ) ;
637637 }
638638 }
@@ -655,7 +655,7 @@ async fn cache_bucket(
655655 let bucket_url =
656656 format ! ( "{archive_url}/bucket/{bucket_0}/{bucket_1}/{bucket_2}/bucket-{bucket}.xdr.gz" ) ;
657657
658- print. globe ( format ! ( "Downloading bucket {bucket_index} {bucket}…" ) ) ;
658+ print. globeln ( format ! ( "Downloading bucket {bucket_index} {bucket}…" ) ) ;
659659
660660 let bucket_url = Url :: from_str ( & bucket_url) . map_err ( Error :: ParsingBucketUrl ) ?;
661661
@@ -671,15 +671,13 @@ async fn cache_bucket(
671671 }
672672
673673 if let Some ( len) = response. content_length ( ) {
674- print. clear_line ( ) ;
675- print. globe ( format ! (
674+ print. clear_previous_line ( ) ;
675+ print. globeln ( format ! (
676676 "Downloaded bucket {bucket_index} {bucket} ({})" ,
677677 ByteSize ( len)
678678 ) ) ;
679679 }
680680
681- print. println ( "" ) ;
682-
683681 let stream = response
684682 . bytes_stream ( )
685683 . map ( |result| result. map_err ( std:: io:: Error :: other) ) ;
0 commit comments