@@ -16,7 +16,6 @@ use indicatif::{
1616 ProgressStyle ,
1717} ;
1818use iroh:: { key:: PublicKey , relay:: RelayUrl , NodeAddr } ;
19- use iroh_base:: { node_addr:: AddrInfoOptions , ticket:: BlobTicket } ;
2019use tokio:: io:: AsyncWriteExt ;
2120
2221use crate :: {
@@ -27,6 +26,7 @@ use crate::{
2726 self , BlobInfo , BlobStatus , CollectionInfo , DownloadOptions , IncompleteBlobInfo , WrapOption ,
2827 } ,
2928 store:: { ConsistencyCheckProgress , ExportFormat , ExportMode , ReportLevel , ValidateProgress } ,
29+ ticket:: BlobTicket ,
3030 util:: SetTagOption ,
3131 BlobFormat , Hash , HashAndFormat , Tag ,
3232} ;
@@ -146,11 +146,6 @@ pub enum BlobCommands {
146146 Share {
147147 /// Hash of the blob to share.
148148 hash : Hash ,
149- /// Options to configure the address information in the generated ticket.
150- ///
151- /// Use `relay-and-addresses` in networks with no internet connectivity.
152- #[ clap( long, default_value_t = AddrInfoOptions :: Id ) ]
153- addr_options : AddrInfoOptions ,
154149 /// If the blob is a collection, the requester will also fetch the listed blobs.
155150 #[ clap( long, default_value_t = false ) ]
156151 recursive : bool ,
@@ -203,18 +198,22 @@ impl BlobCommands {
203198
204199 // create the node address with the appropriate overrides
205200 let node_addr = {
206- let NodeAddr { node_id, info } = node_addr;
201+ let NodeAddr {
202+ node_id,
203+ relay_url : original_relay_url,
204+ direct_addresses,
205+ } = node_addr;
207206 let addresses = if override_addresses {
208207 // use only the cli supplied ones
209208 address
210209 } else {
211210 // use both the cli supplied ones and the ticket ones
212- address. extend ( info . direct_addresses ) ;
211+ address. extend ( direct_addresses) ;
213212 address
214213 } ;
215214
216215 // prefer direct arg over ticket
217- let relay_url = relay_url. or ( info . relay_url ) ;
216+ let relay_url = relay_url. or ( original_relay_url ) ;
218217
219218 NodeAddr :: from_parts ( node_id, relay_url, addresses)
220219 } ;
@@ -357,7 +356,6 @@ impl BlobCommands {
357356 } => add_with_opts ( blobs, addr, path, options) . await ,
358357 Self :: Share {
359358 hash,
360- addr_options,
361359 recursive,
362360 debug,
363361 } => {
@@ -367,8 +365,6 @@ impl BlobCommands {
367365 BlobFormat :: Raw
368366 } ;
369367 let status = blobs. status ( hash) . await ?;
370- let mut addr = addr;
371- addr. apply_options ( addr_options) ;
372368 let ticket = BlobTicket :: new ( addr, hash, format) ?;
373369
374370 let ( blob_status, size) = match ( status, format) {
0 commit comments