@@ -2,10 +2,7 @@ use std::{collections::HashSet, io, ops::Range, path::PathBuf};
22
33use bao_tree:: ChunkRanges ;
44use bytes:: Bytes ;
5- use iroh:: {
6- discovery:: static_provider:: StaticProvider , endpoint:: presets, protocol:: Router , Endpoint ,
7- EndpointId ,
8- } ;
5+ use iroh:: { discovery:: static_provider:: StaticProvider , protocol:: Router , Endpoint , EndpointId } ;
96use irpc:: RpcMessage ;
107use n0_future:: { task:: AbortOnDropHandle , StreamExt } ;
118use tempfile:: TempDir ;
@@ -615,14 +612,14 @@ async fn node_serve_hash_seq() -> TestResult<()> {
615612 let hash_seq = tts. iter ( ) . map ( |x| x. hash ) . collect :: < HashSeq > ( ) ;
616613 let root_tt = store. add_bytes ( hash_seq) . await ?;
617614 let root = root_tt. hash ;
618- let endpoint = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
615+ let endpoint = Endpoint :: builder ( ) . bind ( ) . await ?;
619616 let blobs = crate :: net_protocol:: BlobsProtocol :: new ( & store, None ) ;
620617 let r1 = Router :: builder ( endpoint)
621618 . accept ( crate :: protocol:: ALPN , blobs)
622619 . spawn ( ) ;
623620 let addr1 = r1. endpoint ( ) . addr ( ) ;
624621 info ! ( "node addr: {addr1:?}" ) ;
625- let endpoint2 = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
622+ let endpoint2 = Endpoint :: builder ( ) . bind ( ) . await ?;
626623 let conn = endpoint2. connect ( addr1, crate :: protocol:: ALPN ) . await ?;
627624 let ( hs, sizes) = get:: request:: get_hash_seq_and_sizes ( & conn, & root, 1024 , None ) . await ?;
628625 println ! ( "hash seq: {hs:?}" ) ;
@@ -646,14 +643,14 @@ async fn node_serve_blobs() -> TestResult<()> {
646643 for size in sizes {
647644 tts. push ( store. add_bytes ( test_data ( size) ) . await ?) ;
648645 }
649- let endpoint = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
646+ let endpoint = Endpoint :: builder ( ) . bind ( ) . await ?;
650647 let blobs = crate :: net_protocol:: BlobsProtocol :: new ( & store, None ) ;
651648 let r1 = Router :: builder ( endpoint)
652649 . accept ( crate :: protocol:: ALPN , blobs)
653650 . spawn ( ) ;
654651 let addr1 = r1. endpoint ( ) . addr ( ) ;
655652 info ! ( "node addr: {addr1:?}" ) ;
656- let endpoint2 = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
653+ let endpoint2 = Endpoint :: builder ( ) . bind ( ) . await ?;
657654 let conn = endpoint2. connect ( addr1, crate :: protocol:: ALPN ) . await ?;
658655 for size in sizes {
659656 let expected = test_data ( size) ;
@@ -686,14 +683,14 @@ async fn node_smoke_mem() -> TestResult<()> {
686683async fn node_smoke ( store : & Store ) -> TestResult < ( ) > {
687684 let tt = store. add_bytes ( b"hello world" . to_vec ( ) ) . temp_tag ( ) . await ?;
688685 let hash = tt. hash ( ) ;
689- let endpoint = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
686+ let endpoint = Endpoint :: builder ( ) . bind ( ) . await ?;
690687 let blobs = crate :: net_protocol:: BlobsProtocol :: new ( store, None ) ;
691688 let r1 = Router :: builder ( endpoint)
692689 . accept ( crate :: protocol:: ALPN , blobs)
693690 . spawn ( ) ;
694691 let addr1 = r1. endpoint ( ) . addr ( ) ;
695692 info ! ( "node addr: {addr1:?}" ) ;
696- let endpoint2 = Endpoint :: builder ( ) . preset ( presets :: N0 ) . bind ( ) . await ?;
693+ let endpoint2 = Endpoint :: builder ( ) . bind ( ) . await ?;
697694 let conn = endpoint2. connect ( addr1, crate :: protocol:: ALPN ) . await ?;
698695 let ( size, stats) = get:: request:: get_unverified_size ( & conn, & hash) . await ?;
699696 info ! ( "size: {} stats: {:?}" , size, stats) ;
0 commit comments