@@ -181,7 +181,7 @@ impl std::str::FromStr for TicketOrHash {
181
181
182
182
impl BlobCommands {
183
183
/// Runs the blob command given the iroh client.
184
- pub async fn run ( self , blobs : & blobs:: Client ) -> Result < ( ) > {
184
+ pub async fn run ( self , blobs : & blobs:: Client , addr : NodeAddr ) -> Result < ( ) > {
185
185
match self {
186
186
Self :: Get {
187
187
ticket,
@@ -352,7 +352,7 @@ impl BlobCommands {
352
352
Self :: Add {
353
353
source : path,
354
354
options,
355
- } => add_with_opts ( blobs, path, options) . await ,
355
+ } => add_with_opts ( blobs, addr , path, options) . await ,
356
356
Self :: Share {
357
357
hash,
358
358
addr_options,
@@ -365,7 +365,7 @@ impl BlobCommands {
365
365
BlobFormat :: Raw
366
366
} ;
367
367
let status = blobs. status ( hash) . await ?;
368
- let mut addr: NodeAddr = todo ! ( ) ;
368
+ let mut addr = addr ;
369
369
addr. apply_options ( addr_options) ;
370
370
let ticket = BlobTicket :: new ( addr, hash, format) ?;
371
371
@@ -815,6 +815,7 @@ pub enum TicketOption {
815
815
/// Adds a [`BlobSource`] given some [`BlobAddOptions`].
816
816
pub async fn add_with_opts (
817
817
blobs : & blobs:: Client ,
818
+ addr : NodeAddr ,
818
819
source : BlobSource ,
819
820
opts : BlobAddOptions ,
820
821
) -> Result < ( ) > {
@@ -842,12 +843,13 @@ pub async fn add_with_opts(
842
843
( false , Some ( _) ) => bail ! ( "`--filename` may not be used without `--wrap`" ) ,
843
844
} ;
844
845
845
- add ( blobs, source, tag, ticket, wrap) . await
846
+ add ( blobs, addr , source, tag, ticket, wrap) . await
846
847
}
847
848
848
849
/// Adds data to iroh, either from a path or, if path is `None`, from STDIN.
849
850
pub async fn add (
850
851
blobs : & blobs:: Client ,
852
+ addr : NodeAddr ,
851
853
source : BlobSourceIroh ,
852
854
tag : SetTagOption ,
853
855
ticket : TicketOption ,
@@ -881,7 +883,6 @@ pub async fn add(
881
883
882
884
print_add_response ( hash, format, entries) ;
883
885
if let TicketOption :: Print = ticket {
884
- let addr = todo ! ( ) ;
885
886
let ticket = BlobTicket :: new ( addr, hash, format) ?;
886
887
println ! ( "All-in-one ticket: {ticket}" ) ;
887
888
}
0 commit comments