Skip to content

Commit

Permalink
allow the addr info of tickets to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rklaehn committed Apr 30, 2024
1 parent 13a0bbc commit 91acbda
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions iroh-base/src/ticket/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ impl Ticket for BlobTicket {
fn from_bytes(bytes: &[u8]) -> std::result::Result<Self, ticket::Error> {
let res: TicketWireFormat = postcard::from_bytes(bytes).map_err(ticket::Error::Postcard)?;
let TicketWireFormat::Variant0(res) = res;
if res.node.info.is_empty() {
return Err(ticket::Error::Verify("addressing info cannot be empty"));
}
Ok(res)
}
}
Expand Down
3 changes: 0 additions & 3 deletions iroh-base/src/ticket/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ impl Ticket for NodeTicket {
fn from_bytes(bytes: &[u8]) -> std::result::Result<Self, ticket::Error> {
let res: TicketWireFormat = postcard::from_bytes(bytes).map_err(ticket::Error::Postcard)?;
let TicketWireFormat::Variant0(res) = res;
if res.node.info.is_empty() {
return Err(ticket::Error::Verify("addressing info cannot be empty"));
}
Ok(res)
}
}
Expand Down

0 comments on commit 91acbda

Please sign in to comment.